+ Reply to Thread
Results 1 to 7 of 7

sumif with truly approximate text match

  1. #1
    Registered User
    Join Date
    01-16-2012
    Location
    England
    MS-Off Ver
    various
    Posts
    9

    sumif with truly approximate text match

    Hi,

    I have the following data

    A B C D
    1 Video Game Consoles 2 Gaming
    2 Video Game Handhelds 3 0


    I would like cell D2 to report the sum from column B of the items in A that approximately match in text the text in cell D1.

    =SUMIF(A1:A2,"*"&D1&"*",B1:B2)

    I cannot predict the text in D2 so not fair to change the formula in D2 to search for "Gam" rather than "Gaming". It could also be "Automation" in D1 and "Automatic" in A1:A2 for example. Is there a way to get sumif to search in a truly approximate way?

    Thanks for your help!
    Attached Files Attached Files
    Last edited by nrff; 01-24-2019 at 10:44 AM. Reason: attachment added

  2. #2
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: sumif with truly approximate text match

    How about

    =SUMIF(A1:A2,"*"&LEFT(D1,LEN(D1)-3)&"*",B1:B2)

  3. #3
    Registered User
    Join Date
    01-16-2012
    Location
    England
    MS-Off Ver
    various
    Posts
    9

    Re: sumif with truly approximate text match

    Well,

    =SUMIF(A1:A2,"*"&LEFT(D1,LEN(D1)-3)&"*",B1:B2)

    would work but would also mean already knowing the content of D2 and how similar it is to the content of the columns to search within. As I said, content of D1 might change so chopping the content of D1 in a predictive way wouldn't really work when expanding this example to other words.

  4. #4
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: sumif with truly approximate text match

    Please provide more sample, I may come up with something better.

  5. #5
    Registered User
    Join Date
    01-16-2012
    Location
    England
    MS-Off Ver
    various
    Posts
    9

    Re: sumif with truly approximate text match

    "Automation" in D1 and "Automatic" in A1:A2 for example
    Thanks for your help!

  6. #6
    Registered User
    Join Date
    01-16-2012
    Location
    England
    MS-Off Ver
    various
    Posts
    9

    Re: sumif with truly approximate text match

    really after a general "approximate" option like the FALSE in vlookup. Not sure there are any wildcards in sumif for this purpose ...

  7. #7
    Registered User
    Join Date
    01-16-2012
    Location
    England
    MS-Off Ver
    various
    Posts
    9

    Re: sumif with truly approximate text match

    the content of D1 might also come from having split a sentence in another cell by using the space as delimiter. So it could be something like "Gaming:", i.e. the number of characters from D1 to consider in the actual sumif would be unpredictable.

+ 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. Match Text to an Approximate Match
    By Fredbugatti in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-27-2018, 10:31 PM
  2. Replies: 4
    Last Post: 03-31-2017, 05:49 AM
  3. [SOLVED] Match Index to an approximate value
    By bturner73 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-20-2016, 03:28 PM
  4. Need first approximate match returned
    By RRW119 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 12-09-2015, 10:19 AM
  5. match approximate 2 column
    By alaaabouelazm in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-24-2015, 12:08 PM
  6. [SOLVED] Locate approximate match
    By escapes88 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 08-18-2013, 10:18 AM
  7. Find Approximate Match
    By nvallev in forum Excel General
    Replies: 4
    Last Post: 07-06-2011, 07:31 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