How to Extract Specific Words from Excel Database

A web query by one of our website visitors Mason: ‘I have a large database of names of boys and girls arranged in alphabetical order. I wish to extract only the four letter names. Is there a method to do this in Excel easily? Can I use the ‘len’ function to accomplish this task?’ We describe below in the MS Excel training video a few methods to solve the problem:

  • Use AutoFilter with wild card characters to perform the extraction
  • Use Advanced Filter with wild card characters ‘?’ and the copy feature to pull the required words from the database
  • Use the LEN function in Excel in combination with the IF function to extract the exact data from the database
  • Use a macro or Excel VBA to pull data from the collection of of words

Finally attach the above macro to a command button and find the exact information you need Although we have described the finding and extraction of four letter words you can use use the above solution to find all kinds of data from a database using MS Excel. Watch the Microsoft Excel training video for a complete demo:

8 thoughts on “How to Extract Specific Words from Excel Database

  1. Hello,

    I also have a large database with names of goods and some details regarding their values, year of acquisition, inventory number etc. I want to extract in another sheet all the details linked to some inventory number I introduce . For exemple, when I write 123, all the details should appear in the new sheet, its name, its age etc.

    Can you help me with that? Thank you very much.
    P.S.I tried to use Vlookup, but it doesn’t return text.

  2. dear sir,
    i have an excel worksheet with data upto 5700 plus rows. column A contains account numbers, column B contains Name, column C contains Pin numbers. Now i want to do a vlookup using excel vba, lookup value being account number. (i.e. vlookup should search using account number and disply account no, name and pin numbers). can u please tell me how to achive that.
    awaiting to here from you.


  3. Hi Team,

    Can you help me on the below requirement.

    i have 100 of company names and i want domains of that into excel
    Column A Column B

    When we search on the google which show the result in the top that domain it should come on Column B

    if you need more information please contact to my mail id [email protected]

    Thanks in Advance

  4. Hello Sir,
    I understood this macro. how can we extend this macro where it should ask popup box to user to enter preference of character number then based on that number , length of characters names to be displayed.


  5. I am trying to automate my company’s invoice coding process. After I have exported the invoice to excel, where do I even start to code? We have 103+ vendors and we code for for different types of food, clothing, chemicals, etc. I want to know if it is even possible to program a macro that will add up the cost of all the produce, meat, dairy, chemicals, etc, individually, and them create a table that has the vendors PO # and a breakdown of the $ amounts by object code? Any advice would be greatly appreciated. Thank you.

  6. Hi Sir,

    I want to create a tool which is used to select the random data from the master table. Hence please help to create a tool from VBA code. Kindly let me know the code to select the random data points from the master table. Post selection of random data will be store in different excel file.


  7. Hi,

    I need help.Please see below my matter:
    I have in a column (A) a bunch of string/text ,and I want in VBA to extract a particular word from these each cells,and then to copy into another column this particular word only.

    Can you help ,me,please?

    Thank you !
    michael i.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.