+ Reply to Thread
Results 1 to 8 of 8

Find all instances of a word in sheet and input target word in same row different column

  1. #1
    Registered User
    Join Date
    05-05-2019
    Location
    Langhorne, PA
    MS-Off Ver
    2016
    Posts
    4

    Find all instances of a word in sheet and input target word in same row different column

    Hi All, Im new here and have basic excel knowledge. My accountant emailed me over a spreadsheet of book keeping items broken up into columns: Date, Description, Amount, and Type. He wants me to identify what Type each item is such as Small Tools, Gas, Meals, Equipment, etc

    There are so many recurring items such as "Shell" in the Description column which is for Type "Gas" that there must be a way to do this quickly instead of going line item by line item and typing "Gas". I am familiar with the Find and Replace but that only finds all "Shell" and replaces it with "Gas".

    I want to find all "Shell" in the Description Column and have excel put in "Gas" in the Type Column that corresponds to each line item row.

    any help would be much appreciated.

  2. #2
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Find all instances of a word in sheet and input target word in same row different colu

    use a formula in your target column.

    =IF(ISERROR(FIND("shell",LOWER(A1))),"","Gas")



    This can be extended. =IF(ISERROR(FIND("shell",LOWER(A1))),"","Gas")&IF(ISERROR(FIND("lloyds",LOWER(A1))),"","Insurance")


    Attach a sample workbook (not a picture or pasted copy). Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

  3. #3
    Registered User
    Join Date
    05-05-2019
    Location
    Langhorne, PA
    MS-Off Ver
    2016
    Posts
    4

    Re: Find all instances of a word in sheet and input target word in same row different colu

    mehmetcik, thanks for responding

    I input the formula in the target column but nothing happened
    Attached Files Attached Files

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,815

    Re: Find all instances of a word in sheet and input target word in same row different colu

    Did you first change it to this?

    =IF(ISERROR(FIND("shell",LOWER(C3))),"","Gas")
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  5. #5
    Registered User
    Join Date
    05-05-2019
    Location
    Langhorne, PA
    MS-Off Ver
    2016
    Posts
    4

    Re: Find all instances of a word in sheet and input target word in same row different colu

    I highlighted the G Column. Then in the formula I typed =IF(ISERROR(FIND("WAWA",LOWER(C3))),"","Gas"). Nothing happened

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,815

    Re: Find all instances of a word in sheet and input target word in same row different colu

    That's because you ysed UPPER case!

    Try this:

    =IF(ISERROR(FIND("wawa",LOWER(C3))),"","Gas")

  7. #7
    Registered User
    Join Date
    05-05-2019
    Location
    Langhorne, PA
    MS-Off Ver
    2016
    Posts
    4

    Re: Find all instances of a word in sheet and input target word in same row different colu

    I thought that the find function was case sensitive that is why I typed it like that.

    I change it to wawa and that worked.

    Now the problem is when I want to find all "Home Depot" =IF(ISERROR(FIND("home depot",LOWER(C5))),"","repair maintenance"), It deletes all the "Gas" that were put in from the first formula.

    I need to be able to have excel not delete items that I have put in "Gas" "Repair Maintenance" "Shop Supplies" and so on until every transaction is marked up

  8. #8
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,815

    Re: Find all instances of a word in sheet and input target word in same row different colu

    See this advice from post #2:
    This can be extended. =IF(ISERROR(FIND("shell",LOWER(A1))),"","Gas")&IF(ISERROR(FIND("lloyds",LOWER(A1))),"","Insurance")

    I thought that the find function was case sensitive that is why I typed it like that.
    It is, but you are telling Excel to change the lookup cell to lower case, so the lookup value needs to be lower case.

    =IF(ISERROR(FIND("wawa",LOWER(C3))),"","Gas")

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Find Multiple Instances of Word in Range and Copy All
    By ScabbyDog in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 01-23-2016, 10:21 AM
  2. Replies: 5
    Last Post: 10-15-2014, 03:38 PM
  3. macro if data in column a = set word to insert that column into sheet 2 or 3 based on word
    By ExcelBeginner326 in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 05-13-2014, 01:57 PM
  4. Replies: 4
    Last Post: 11-02-2012, 04:14 PM
  5. VBA to enter a word, find said word in string of column & copy to another column
    By tuneloon in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 06-29-2012, 11:59 AM
  6. is it possible to count instances of a word in a column?
    By alexfleming in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 10-14-2009, 04:24 PM
  7. Find and Replace Instances of a Word in a Cel
    By Marx in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-01-2006, 08:45 AM

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