+ Reply to Thread
Results 1 to 6 of 6

Populate new cells based on keywords in description field

  1. #1
    Registered User
    Join Date
    08-14-2012
    Location
    Minneapolis, MN
    MS-Off Ver
    Excel 2010
    Posts
    3

    Populate new cells based on keywords in description field

    Hello, I'm new to the forum so hopefully this problem hasn't come up in the past and already been answered. I looked through and didn't see anything that was exactly what I needed.

    I have an ~8000 line spreadsheet with a bunch of information including a description field. I was asked to separate/sort the line items by adding product type and sub-type fields. There are keywords in the existing description field that help me determine which type and sub-type to choose.

    For example, the description cell for a specific line item might say something like "Joint Operations Graphic (JOG) 1:250,000 Scale", from this I know the product type is Aeronautical and the sub-type is NGA-JOG.

    Is there any way that I can search for/use the keywords and based on these keywords, automatically populate a cell for product type and subtype? I tried doing something like =IF(a2="JOG","Aeronautical") but since all the description fields are different, I think I need something that will search for a specific word within the cell. I also read a little bit about velookup, but that didn't seem to be something that would work for this, but I wouldn't be surprised if I just didn't understand how it works.

    Any help would be appreciated!

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: Populate new cells based on keywords in description field

    do you have a list of all of those abbreviations/keywords? and is there any fixed location (or way of determining) that they would fall, withing your data?
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    08-15-2012
    Location
    tmingyue
    MS-Off Ver
    tmingyue
    Posts
    1

    Re: Populate new cells based on keywords in description field

    Great topic, keep myself through looking it.

  4. #4
    Registered User
    Join Date
    08-14-2012
    Location
    Minneapolis, MN
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Populate new cells based on keywords in description field

    I have a list of the necessary product types and subtypes, so yes, I have a list of the keywords. Unfortunately some of the description fields don't include a keyword, but only a county name, so I will probably end up doing those manually. I'm not sure I understand the second part of your question, but I currently have the description field sorted alphabetically. I don't need the product type and subtype to be in a specific order after they are populate because I can just sort them alphabetically as well when they are finished. I did however consider the idea of finding a keyword and having excel send that row to a new sheet, and but I have no idea if that's possible or easier. Let me know if I answered your question! Thanks!

  5. #5
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: Populate new cells based on keywords in description field

    in your example Joint Operations Graphic (JOG) 1:250,000 Scale, you say you want to extract/sort on NGA-JOG. now, i can see where JOG comes from, but not NGA. so my question is 2=fold. JOG starts at the 26th character - or the 1st ( and is 3 characters long. will that always be the caseor how do you/i identify which parts to extract? and how did you arrive at NGA.

  6. #6
    Registered User
    Join Date
    08-14-2012
    Location
    Minneapolis, MN
    MS-Off Ver
    Excel 2010
    Posts
    3

    Unhappy Re: Populate new cells based on keywords in description field

    Oh, I can see how that could be confusing. The NGA part is really just kind of "jargon". If I can sort by JOG only that is fine, I can find/replace all JOG with NGA-JOG. Unfortunately, no, it will not always be the case that JOG is the 26th character. Let me give you a more comprehensive list of examples.

    cos analysis.jpg

    Here, column G is the description field. Kenya 250K will need to be sorted to product type Topographic Maps (foreign) and subtype Africa. ONCs will need to be sorted to product type Aeronautical Charts and subtype NGA: ONC (or just ONC, and I can add the NGA later).

    For the second example specifically (ONC), if I could run some kind of search that would find the abbreviation ONC and auto populate a subtype column with ONC, then run a search in the subtype column to find ONC and auto populate Aeronautical Charts into a product type column, I think that would be as close to what I need as I can get...

  7. #7
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: Populate new cells based on keywords in description field

    could you upload a sample of what you have please? that will give me a better idea of what im working with, rather than looking a picture. the sample should show various samples of your data, and what you are trying to extract, this will give me some idea of what i need to use to base the extraction on

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1