+ Reply to Thread
Results 1 to 12 of 12

using IF(ISNUMBER(SEARCH formula

  1. #1
    Registered User
    Join Date
    10-15-2011
    Location
    Atlanta, GA
    MS-Off Ver
    Excel 2010
    Posts
    6

    using IF(ISNUMBER(SEARCH formula

    I am trying to figure out how to accomplish the following formula.

    Formula in K2, will look at Cell E2 and if E2 contains "general merchandise" then look at C2, and if C2 contains "QT" (true) put "FUEL" and if C2 does not contain "QT" (false) put value of E2.

    I use a similar to find text values and enter new value but i want compare with another cell before ...

    here is the formula i use but need to add variable of another cell to compare to...

    =IF(ISNUMBER(SEARCH("USAA FED*",C22)),"Mortgage",IF(ISNUMBER(SEARCH("SHELL*",C22)),"AUTO FUEL",IF(ISNUMBER(SEARCH("OFFICE DEPOT*",C22)),"Office Supplies",IF(ISNUMBER(SEARCH("INGLES*",C22)),"Groceries",IF(ISNUMBER(SEARCH("AMAZON*",C22)),"Internet Purchases",IF(ISNUMBER(SEARCH("*Manley, R*",C22)),"Transfer to Canon",IF(ISNUMBER(SEARCH("*HOLY RED**",C22)),"Education",IF(ISNUMBER(SEARCH("*PUBLIX*",C22)),"Groceries",IF(ISNUMBER(SEARCH("*TRADER JOE*",C22)),"Groceries",IF(ISNUMBER(SEARCH("*dillard*",C22)),"Department Store",C22))))))))))

    Thanks Dave

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: using IF(ISNUMBER(SEARCH formula

    Hello Dave,

    Welcome to the Forum!

    This would be easier to sort out with some sample data. Can post your workbook?
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: using IF(ISNUMBER(SEARCH formula

    If you list all the search phrases (without the trailing asterisks) in a column somewhere and list the corresponding results you want in an adjacent column, then you might be able to use this:


    =LOOKUP(9.999999e+307,SEARCH($X$2:$X$10,C22),$Y$2:$Y$10)

    this will lookup all the phrases in say X2:X10 and find which is contained in C22... then return the corresponding item from Y2:Y10...

    adjust ranges to suit.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  4. #4
    Registered User
    Join Date
    10-15-2011
    Location
    Atlanta, GA
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: using IF(ISNUMBER(SEARCH formula

    Hi and thanks for the reply's.I tried the LOOKUP approach plugging in my values and it returned a #REF. Here what I tried.
    =CHOOSE(MATCH(C3,{"USAA FED*","*HOLY RED*","HEWLETT PACK*","GLIC","*GRANT*"},E3),"Mortgage","Education","Deposit HP","Deposit Insurance","Student Loan")

    Maybe i didn't explain what i was trying to do very well. I am taking bank data and doing a budget pivot table. Column C header is "original description". Column E header is Catagory. Some entries in catagory are "unassigned" and i want to identify all give them a description I can catagorize in te pivot table. Also there are many different unassigned "original descriptions".

    So in F2 i want a formula, that looks at cell E2, if it is "unassigned" then look at C2, and if it says "HRCS" put "Education is F2, if it says USAA FED*" put "mortgage" in F2, etc.

    Thx
    DM

  5. #5
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,587

    Re: using IF(ISNUMBER(SEARCH formula

    For match function you can use

    =MATCH("*"&C3&"*",{"USAA FED*","*HOLY RED*","HEWLETT PACK*","GLIC","*GRANT*"},0)

  6. #6
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: using IF(ISNUMBER(SEARCH formula

    Maybe you should post your sample workbook as Leith suggested.

  7. #7
    Registered User
    Join Date
    10-15-2011
    Location
    Atlanta, GA
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: using IF(ISNUMBER(SEARCH formula

    I got it to work , but now trying to group SEARCH(find-text .... It worked if i use only (1) value for example ....
    IF(ISNUMBER(SEARCH("XXX",C1545)),"XXXX",E1545)

    I group several find_values using { } below but it returns C1545 instead of ARGON, GLIC ... depending

    ,IF(ISNUMBER(SEARCH({"AEGON","Assurity*","*GLIC*"},C1545)),"Deposit Insurance",IF(ISNUMBER ....

  8. #8
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: using IF(ISNUMBER(SEARCH formula

    So you are not willing to try my formula in Post #3.... and you are not willing to post a sample workbook... ok. Got it!

  9. #9
    Registered User
    Join Date
    10-15-2011
    Location
    Atlanta, GA
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: using IF(ISNUMBER(SEARCH formula

    Sorry, I do appreciate the help and suggestions. I tried post #3 and tried to make it work but could not figure it out. Also my file had a lot of confidential banking info, however i have made it more generic in order to share. See attached simplified file. there are many more entries in my file.

    for example; there are multiple unique entries that I want to call Education in Column F. Current they are seperate entries. Is there a way to group them is a look_up value?

    Also I do not see how to post/upload the file?

  10. #10
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: using IF(ISNUMBER(SEARCH formula

    From Forum FAQs

    How do I attach a file to a post?

    To attach a file to your post, you need to be using the main 'New Post' or 'New Thread' page and not 'Quick Reply'. To use the main 'New Post' page, click the 'Post Reply' button in the relevant thread.

    On this page, below the message box, you will find a button labelled 'Manage Attachments'. Clicking this button will open a new window for uploading attachments. You can upload an attachment either from your computer or from another URL by using the appropriate box on this page. Alternatively you can click the Attachment Icon to open this page.

    To upload a file from your computer, click the 'Browse' button and locate the file. To upload a file from another URL, enter the full URL for the file in the second box on this page. Once you have completed one of the boxes, click 'Upload'.

    Once the upload is completed the file name will appear below the input boxes in this window. You can then close the window to return to the new post screen.

  11. #11
    Registered User
    Join Date
    10-15-2011
    Location
    Atlanta, GA
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: using IF(ISNUMBER(SEARCH formula

    I have uploaded the file, are you able to see it? Also as mentioned, i was able to get the results I wanted using the following formula. As mentioned i want to be able to have multiple "find_text" conditions so I don't have to have so many IF statements. Is that possible with this type of formula?

    =IF(ISNUMBER(SEARCH("USAA FED*",C2)),"Mortgage",IF(ISNUMBER(SEARCH({"HOLY*","GRANT"},C2)),"Education",IF(ISNUMBER(SEARCH("Hourly",C2)),"Deposit CTG",IF(ISNUMBER(SEARCH("AEGON",C2)),"Deposit Insurance",IF(ISNUMBER(SEARCH("Assurity*",C2)),"Deposit Insurance",IF(ISNUMBER(SEARCH("*GLIC*",C2)),"Deposit Insurance",IF(ISNUMBER(SEARCH("HEWLETT",C2)),"Deposit HP",IF(ISNUMBER(SEARCH("GRANT",C2)),"Education",IF(ISNUMBER(SEARCH("WIRE TYPE",C2)),"Deposit - Edward Jones",IF(ISNUMBER(SEARCH("CHEVRON",C2)),"Gasoline/Fuel",IF(ISNUMBER(SEARCH("XXX",C2)),"XXXX",IF(ISNUMBER(SEARCH("XXX",C2)),"XXXX",IF(ISNUMBER(SEARCH("XXX",C2)),"XXXX",E2)))))))))))))

  12. #12
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: using IF(ISNUMBER(SEARCH formula

    I agree with NBVC's suggestion in post 3, even if you don't want a separate table you can implement the same approach with everything contained in the formula, then you'd have a shorter formula.

    Regarding the last formula you posted ......the way you are using SEARCH with ISNUMBER doesn't allow you to use multiple choices, but if you use COUNT instead of ISNUMBER you can have multiples, so this formula will replicate yours (and you don't need any wildcards like *)

    =IF(COUNT(SEARCH("USAA FED",C2)),"Mortgage",IF(COUNT(SEARCH({"HOLY","GRANT"},C2)),"Education",IF(COUNT(SEARCH("Hourly",C2)),"Deposit CTG",IF(COUNT(SEARCH({"AEGON","Assurity","GLIC"},C2)),"Deposit Insurance",IF(COUNT(SEARCH("HEWLETT",C2)),"Deposit HP",IF(COUNT(SEARCH("WIRE TYPE",C2)),"Deposit - Edward Jones",IF(COUNT(SEARCH("CHEVRON",C2)),"Gasoline/Fuel",IF(COUNT(SEARCH("XXX",C2)),"XXXX",E2))))))))
    Last edited by daddylonglegs; 10-19-2011 at 01:46 PM.
    Audere est facere

+ 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