+ Reply to Thread
Results 1 to 10 of 10

SUMIFS (text to number problem)

  1. #1
    Forum Contributor
    Join Date
    02-09-2015
    Location
    malta
    MS-Off Ver
    Microsoft 365
    Posts
    387

    SUMIFS (text to number problem)

    Hi all,

    Hope all is well. I need some help on sumifs formula. I am trying to do a sumifs formula however I have the criteria range which is in text. Therefore the sumif formula is not working properly. Is there a possible way how I can incorporate this fact into the formula so as to convert the text to number, in order for the sumif formula to work?

    Apologies, if this thread has been posted already, if yes can someone pls guide me accordingly?

    I have also attached the file for reference

    Thanks everyone
    Attached Files Attached Files

  2. #2
    Forum Expert cbatrody's Avatar
    Join Date
    04-15-2014
    Location
    Dubai
    MS-Off Ver
    Microsoft Office 365 ProPlus
    Posts
    2,136

    Re: SUMIFS (text to number problem)

    Hi,

    Can you not add a helper column to convert the text into numbers?

    =C9*1

    See the attached file.
    Attached Files Attached Files

  3. #3
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 365 version 2501
    Posts
    18,997

    Re: SUMIFS (text to number problem)

    I believe that this will do what you want.

    Copy of Test(2).xlsx

    Hope this helps.

  4. #4
    Forum Expert
    Join Date
    03-20-2015
    Location
    Primarily UK, sometimes NL
    MS-Off Ver
    Work: Office 365 / Home: Office 2010
    Posts
    2,405

    Re: SUMIFS (text to number problem)

    Hi,

    You can change all the text values by selecting the range (C9:C28) using Data | Text-to-columns then clicking 'Finish' on the first dialogue box. That will make them all numbers so the formula will work.

    If the data is being imported from elsewhere as text or there's some other reason it needs to be text, then try using VALUE. =VALUE(A1) will return the numerical value of A1, even if it's formatted as text. Unfortunately, I'm on 2003 at work, which doesn't support SUMIFS so I can't check exactly how this will fit into your formula - but it should be something like:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    You'll need to enter it as an array formula by pressing Ctrl-Shift-Enter instead of just Enter - the formula will then get curly brackets {} around it. If you press just Enter, you'll get an error or an obviously wrong result - go back into the cell, press F2 then Ctrl-Shift-Enter again.

    Regards,
    Aardigspook

    If your problem is solved, please go to 'Thread Tools' on your first post and 'Mark Thread as Solved'.
    You don't need to give me rep if I helped, but thanks are appreciated.

  5. #5
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,880

    Re: SUMIFS (text to number problem)

    =sumproduct((e9:e28)*(c9:c28>="20500000")*(c9:c28<="2100000"))

  6. #6
    Forum Expert
    Join Date
    03-20-2015
    Location
    Primarily UK, sometimes NL
    MS-Off Ver
    Work: Office 365 / Home: Office 2010
    Posts
    2,405

    Re: SUMIFS (text to number problem)

    As I said above, I can't check the SUMIFS formula at the moment, but this Excel2003 equivalent works:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    (again, an array formula - enter with Ctrl-Shift-Enter)
    so I don't see why the SUMIFS I suggested above shouldn't.

    Regards,
    Aardigspook

    If your problem is solved, please go to 'Thread Tools' on your first post and 'Mark Thread as Solved'.
    You don't need to give me rep if I helped, but thanks are appreciated.

  7. #7
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: SUMIFS (text to number problem)

    Quote Originally Posted by Aardigspook View Post
    =SUMIFS($E$9:$E$28,VALUE($C$9:$C$28),">20500000",VALUE($C$9:$C$28),"<21000000")
    SUMIFS won't accept "array manipulation" like that.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  8. #8
    Forum Contributor
    Join Date
    02-09-2015
    Location
    malta
    MS-Off Ver
    Microsoft 365
    Posts
    387

    Re: SUMIFS (text to number problem)

    Hi all,

    CbaTrody and JeteMc thanks a lot for your reply, both your replies provided a solution, so thanks I was also interested in seeing whether I could obtain the same result without adding a helper column!

    Ardigspook the first solution you provided uncluckily did not work (the one with the array), however the second one worked magic! So thanks a lot

    JohnTopley also thanks a lot, your solution also worked wonders!!

    Cheers guys!

  9. #9
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: SUMIFS (text to number problem)

    There is no need in VALUE function and CTRL-SHIFT-ENTER when you use SUMPRODUCT. The text can easily be converted with double-unary.

    =SUMPRODUCT((--C9:C28>20500000)*(--C9:C28<21000000)*E9:E28)
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  10. #10
    Forum Expert
    Join Date
    03-20-2015
    Location
    Primarily UK, sometimes NL
    MS-Off Ver
    Work: Office 365 / Home: Office 2010
    Posts
    2,405

    Re: SUMIFS (text to number problem)

    @Keibri

    You're welcome.

    @AlKey

    I didn't know that - thanks.

    Regards,
    Aardigspook

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. text to number problem
    By kingdom42 in forum Excel General
    Replies: 7
    Last Post: 05-20-2013, 07:07 AM
  2. [SOLVED] Sumifs, problem with the formula: =sumifs(c10:c200,<=today(),0)
    By Faustocruz in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-08-2012, 04:26 AM
  3. Replies: 5
    Last Post: 04-29-2012, 12:46 AM
  4. Number to Text - Wierd Problem
    By Ricco Balboa in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-23-2010, 07:12 AM
  5. Number store as text & text date with 2 digit year problem
    By obc1126 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-24-2008, 01:23 AM
  6. number to text problem
    By GottaRun in forum Excel General
    Replies: 2
    Last Post: 02-19-2006, 02:30 AM
  7. Problem with Number to Text Conversion
    By vioravis in forum Excel General
    Replies: 4
    Last Post: 02-09-2005, 04:06 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