Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

What is the correct syntax for Sumif when condition is for a text string?

B2 and b3 both contain the text "Grc".

C2 contains 1 and C3 contains 2.

F2 contains a Sumif that reads as: =SUMIF(B2:B10, "=Grc", C2:C10)

The result is "0" when it should yield 3


I can't figure out what happened.

iPad, iOS 5.1.1

Posted on Jul 14, 2013 6:45 AM

Reply
Question marked as Top-ranking reply

Posted on Jul 14, 2013 7:42 AM

Hi ishiiboy


I can't reproduce your problem. It works for me (Columns changed to make a smaller screen shot):


User uploaded file


Formula in C2 is:


=SUMIF(A2:A10, "=Grc", B2:B10)


Column A formatted as Text.

Column B formatted as Number.

Column C formatted as Automatic.


Regards,

Ian.


P.S. I have had an Aha! moment. Are you entering "Grc" with those quotes?


User uploaded file


Just enter Grc.

Ian.

14 replies
Sort By: 
Question marked as Top-ranking reply

Jul 14, 2013 7:42 AM in response to ishiiboy

Hi ishiiboy


I can't reproduce your problem. It works for me (Columns changed to make a smaller screen shot):


User uploaded file


Formula in C2 is:


=SUMIF(A2:A10, "=Grc", B2:B10)


Column A formatted as Text.

Column B formatted as Number.

Column C formatted as Automatic.


Regards,

Ian.


P.S. I have had an Aha! moment. Are you entering "Grc" with those quotes?


User uploaded file


Just enter Grc.

Ian.

Reply

Jul 14, 2013 7:25 PM in response to ishiiboy

This forum is for Numbers on a Mac running OS X. Is you screen shot from an iOS device?


I don't know anything about Numbers for iOS.


Or are you using Excel?


Just a guess, but try removing the quotes around =Grc in the formula.


If you are running iOS, you will get a better answer in this forum:


https://discussions.apple.com/community/app_store/iwork_for_ios?view=discussions


Regards,

Ian.

Reply

Jul 15, 2013 7:48 AM in response to Yellowbox

Hi Yellowbox,


When I try to use text after I enter the "=" i am forced into a "Enter Text:" module to enter the "Grc" text. Once finished, the software automatically produces the quotation marks around the text I entered. I then received a syntax error.

User uploaded file


I tried it without the "=" and still get a "0":


User uploaded file

Reply

Jul 15, 2013 8:00 AM in response to ishiiboy

Hi ishii,


Your screen shots make no sense to me. I am using Numbers'09 on a MacBook Pro running OS X. Please tell us what device, operating system and app you are using. You still have not told us.


This forum is for Numbers on a Mac running OS X. Is your screen shot from an iOS device?

I don't know anything about Numbers for iOS.

Or are you using Excel?


I can not help you. If you are using an iPad, you will get a better answer in this forum:


https://discussions.apple.com/community/app_store/iwork_for_ios?view=discussions


Regards,

Ian.

Reply

Jul 15, 2013 1:30 PM in response to ishiiboy

I regret that I can't confirm your problem. I reluctantly retrieved my iPod and fired up my iOS Numbers to test this problem. Since the iPod has such a compact user interface, I can only show you a portion of the expression in the editor, but I think you can determine that the function is working as I suggested it would.


User uploaded file

I'm sorry that I can't bring myself to exactly duplicate your layout since it grates on me to have Header Rows and Columns and not use them.


I so dislike the iOS Numbers app on the iPhone/iPod platform that I rarely use it. Those times that I do use it, it's with great gnashing of teeth as I fumble with what to me is an awkward interface. Ultimately though, a simple example like this can be demonstrated.


I'd like to help you, but beyond resturcturing the solution so as to not use quoted text within the expression, I can't thing of anything else to suggest. There's not much else to look at.


Jerry

Reply

Jul 15, 2013 5:23 PM in response to ishiiboy

The problem is column C has text "numbers", not actual numbers. You can tell because they are left justified like text, not right justified like numbers. Select C2 and click the "42" icon instead of the "T" and it will become a number and will sum up in the SUMIF. Do the same for the rest of the column.

Reply

What is the correct syntax for Sumif when condition is for a text string?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.