+ Reply to Thread
Results 1 to 5 of 5

Sumif on Values stored as text and Criteria need wildcard.

  1. #1
    Registered User
    Join Date
    02-11-2009
    Location
    Salt Lake City, Utah
    MS-Off Ver
    Excel 2010
    Posts
    98

    Sumif on Values stored as text and Criteria need wildcard.

    I have a data sheet that was given to me where all numbers are stored as text. I need to sum all instances, of one value, but there are different variations of the matching criteria. So, for example, if I wanted to sum all results for 400044, I would use this formula:
    Please Login or Register  to view this content.
    However, because all of Column B is formatted as text, the result is 0.
    I can get the correct result by physically changing each cell to a number, but due to the way the spreadsheet is set up, I'd have to do that for each and every cell. So if there is some variation of my formula that would ignore the "text" format, and just sum up anyway, that would be awesome.
    Column A Column B Column C Column D
    Name Result Total Of:
    330864 : 1 . 6 1148.11 400044 (Formula here in D2)
    330864 : 1 . 6 798.71
    330864 : 1 . 6 1166.05
    330864 : 1 . 6 1821.54
    330864 : 1 . 6 579.73
    330864 : 1 . 6 220.06
    330864 : 2 . 7 1189.29
    330864 : 2 . 7 850.62
    330864 : 2 . 7 1129.55
    330864 : 2 . 7 1863.24
    330864 : 2 . 7 569.68
    330864 : 2 . 7 253.54
    400044 : 1 . 8 1171.75
    400044 : 1 . 8 849.91
    400044 : 1 . 8 1145.93
    400044 : 1 . 8 1940.84
    400044 : 1 . 8 584.29
    400044 : 1 . 8 172.44
    400044 : 2 . 9 1186.25
    400044 : 2 . 9 857.92
    400044 : 2 . 9 1155.86
    400044 : 2 . 9 1943.53
    400044 : 2 . 9 587.68
    400044 : 2 . 9 175.88
    Last edited by timmtamm; 10-05-2017 at 07:23 PM. Reason: Changing to table
    Excel: Not my profession, but useful in it.

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Sumif on Values stored as text and Criteria need wildcard.

    If all the text 'numbers' are in their own column then you can copy a zero value from a cell, select the column of 'numbers' and use Paste Special Add to convert them all to numbers. Then use the SUMIF()
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Registered User
    Join Date
    02-11-2009
    Location
    Salt Lake City, Utah
    MS-Off Ver
    Excel 2010
    Posts
    98

    Re: Sumif on Values stored as text and Criteria need wildcard.

    True, that would be shorter. But is there a function that would sum it as is?
    Last edited by timmtamm; 10-05-2017 at 08:06 PM.

  4. #4
    Valued Forum Contributor Root_'s Avatar
    Join Date
    07-29-2017
    Location
    _
    MS-Off Ver
    2010+
    Posts
    485

    Re: Sumif on Values stored as text and Criteria need wildcard.

    Maybe

    =SUMPRODUCT(--(LEFT(A2:A99,LEN(C2))=C2&""),--B2:B99)

  5. #5
    Registered User
    Join Date
    02-11-2009
    Location
    Salt Lake City, Utah
    MS-Off Ver
    Excel 2010
    Posts
    98

    Re: Sumif on Values stored as text and Criteria need wildcard.

    That almost worked, but it gave me enough information to finish it off. Thank you.
    The finished formula was like this:

    =SUMPRODUCT(--(LEFT(A2:A99,LEN(C2))=C2),--B2:B99)

    Thanks a bunch!

+ 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] SUMIFS with text wildcard and multiple criteria in the same column
    By rs1aj in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 04-18-2016, 11:59 AM
  2. SUMIF with wildcard, need to exclude a criteria
    By dhabersaat in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-21-2014, 08:44 PM
  3. [SOLVED] countif 16 digits nymber stored as text, by date criteria
    By tony81 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 09-08-2014, 01:42 PM
  4. Please help-INDEX and finding MAX date of criteria in text string with wildcard
    By GirlAnalyst in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 04-18-2013, 05:05 PM
  5. Select Max Date Based on Multiple Criteria with Wildcard Text
    By TxNyCa in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-28-2013, 02:34 PM
  6. excel count unique text with wildcard criteria
    By teko77tr in forum Excel General
    Replies: 2
    Last Post: 07-02-2008, 09:15 AM
  7. [SOLVED] How do I count wildcard text meeting certain criteria in EXCEL?
    By cybermaksim in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-16-2006, 11:10 PM

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