+ Reply to Thread
Results 1 to 3 of 3

I want to do a partial comparison and return a value if one of a bunch of values are found

  1. #1
    Registered User
    Join Date
    11-01-2009
    Location
    California
    MS-Off Ver
    Excel 2013
    Posts
    43

    I want to do a partial comparison and return a value if one of a bunch of values are found

    This is to make may taxes easier....
    I want to have a list (like a credit card or band transaction) and look in the list for certain words in another list, and if a given word from that list is found, to return what category that word is tied to.


    Example
    1/1/2018 Amz xxxxxxx 78.23
    1/2/2018 city Shell xxxxxxx 19.25
    1/4/2018 xxx Staples xxxx 20.90
    1/6/2018 Safeway 12.20
    1/6/2019 x Staples xxxx xxx 42.01

    Match cat
    Amz Office Supplies
    Shell Auto Fuel
    Staples Office Equipment

    And the results should be like:
    1/1/2018 Amz xxxxxxx 78.23 Office Supplies
    1/2/2018 city Shell xxxxxxx 19.25 Auto Fuel
    1/4/2018 xxx Staples xxxx 20.90 Office Equipment
    1/6/2018 Safeway 12.20
    1/6/2019 x Staples xxxx xxx 42.01 Office Equipment

    How could I do something like this? I would like to have the match and cat list as dynamic...

    Thanks!
    Mc
    Tax cat

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

    Re: I want to do a partial comparison and return a value if one of a bunch of values are f

    Enter your Data in Column A of Sheet1 starting at A2.

    Example*
    1/1/2018 Amz xxxxxxx 78.23
    1/2/2018 city Shell xxxxxxx 19.25
    1/4/2018 xxx Staples xxxx 20.90
    1/6/2018 Safeway 12.20
    1/6/2019 x Staples xxxx xxx 42.01

    '**************************************************************************

    Enter your Lookup Data in Columns A and B of a Sheet Named "Data"

    Column A Column B
    Match Category
    Amz Office Supplies
    Shell Auto Fuel
    Staples Office Equipment

    '**************************************************************************

    Paste this formula in Cell B2 of Sheet1 and fill down

    =A2 & " " &IF(ISNA(MATCH(MID(A2,FIND(" ",A2)+1,FIND("|",SUBSTITUTE(A2," ","|",2))-FIND(" ",A2)-1),Data!A:A,0)),IF(ISERROR(MATCH(MID(A2,FIND("|",SUBSTITUTE(A2," ","|",2))+1,FIND("|",SUBSTITUTE(A2," ","|",3))-FIND("|",SUBSTITUTE(A2," ","|",2))-1),Data!A:A,0)),"",INDEX(Data!B:B,MATCH(MID(A2,FIND("|",SUBSTITUTE(A2," ","|",2))+1,FIND("|",SUBSTITUTE(A2," ","|",3))-FIND("|",SUBSTITUTE(A2," ","|",2))-1),Data!A:A,0),1)),INDEX(Data!B:B,MATCH(MID(A2,FIND(" ",A2)+1,FIND("|",SUBSTITUTE(A2," ","|",2))-FIND(" ",A2)-1),Data!A:A,0),1))
    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
    11-01-2009
    Location
    California
    MS-Off Ver
    Excel 2013
    Posts
    43

    Re: I want to do a partial comparison and return a value if one of a bunch of values are f

    Very close!
    The top data is actually 3 columns, and I just wanted the results, not the field & results (that is just a matter of removing the "A2 &". (Looks like the columns got skewed....)

    It got me what I want and I want to thank you VERY much!

    I got it from here!

    Again, Thank you! I actually have MANY uses for this, but it will help ALL my taxes in the future much easier and I will remember you EACH time!

    Cheers!
    Mc

+ 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. Replies: 3
    Last Post: 08-07-2018, 10:14 AM
  2. [SOLVED] Look for Partial Text and Return Values IF found or Not
    By mrsbrannon in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 04-06-2018, 11:40 AM
  3. [SOLVED] Lookup partial values and if match return partial value from another cell
    By Renejorgensen in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 08-01-2017, 07:53 AM
  4. Check range for values and return list of found unique values
    By kian82 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-13-2017, 04:45 AM
  5. VBA code to partial match and return all values
    By MiltonSilva in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-23-2014, 10:09 AM
  6. Replies: 9
    Last Post: 05-02-2014, 11:04 PM
  7. want to average a bunch of values found with vlookup
    By EBos in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 07-14-2013, 10:06 PM

Tags for this Thread

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