![]() |
Sum and If Function Problem with Excel 2007
I am working with a golf score card. I have a conditional statement that
gives points on a hole depending on the score. The If statements are working perfectly, however, I can not sum the points correctly. I have used $ with the column and row references and have taken the $ away and still receive the same figure, "0" or zero. I get the zero regardless of the figures in the conditional cells. I am using the basic =sum(b2:j2) for the 9 holes. Any assistance would be greatly appreciated! Thank you. |
Sum and If Function Problem with Excel 2007
Is your conditional statement returning numbers that are really text, say
"1", "2", instead of 1 or 2. SUM won't like these. -- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "David" wrote in message ... I am working with a golf score card. I have a conditional statement that gives points on a hole depending on the score. The If statements are working perfectly, however, I can not sum the points correctly. I have used $ with the column and row references and have taken the $ away and still receive the same figure, "0" or zero. I get the zero regardless of the figures in the conditional cells. I am using the basic =sum(b2:j2) for the 9 holes. Any assistance would be greatly appreciated! Thank you. |
Sum and If Function Problem with Excel 2007
Thanks, Bob. I am using the "1", "2" in my conditional statement. The
numbers returned are from "0" to "8". "Bob Phillips" wrote: Is your conditional statement returning numbers that are really text, say "1", "2", instead of 1 or 2. SUM won't like these. -- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "David" wrote in message ... I am working with a golf score card. I have a conditional statement that gives points on a hole depending on the score. The If statements are working perfectly, however, I can not sum the points correctly. I have used $ with the column and row references and have taken the $ away and still receive the same figure, "0" or zero. I get the zero regardless of the figures in the conditional cells. I am using the basic =sum(b2:j2) for the 9 holes. Any assistance would be greatly appreciated! Thank you. |
Sum and If Function Problem with Excel 2007
Remove the quotes from around the numbers. When you quote numbers Excel
evaluates them as text and text is ignored by the SUM function. Don't do like this: =IF(A1="x","1","0") Do like this: =IF(A1="x",1,0) =IF(A1=1,"x",0) Only text is quoted in formulas. -- Biff Microsoft Excel MVP "David" wrote in message ... Thanks, Bob. I am using the "1", "2" in my conditional statement. The numbers returned are from "0" to "8". "Bob Phillips" wrote: Is your conditional statement returning numbers that are really text, say "1", "2", instead of 1 or 2. SUM won't like these. -- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "David" wrote in message ... I am working with a golf score card. I have a conditional statement that gives points on a hole depending on the score. The If statements are working perfectly, however, I can not sum the points correctly. I have used $ with the column and row references and have taken the $ away and still receive the same figure, "0" or zero. I get the zero regardless of the figures in the conditional cells. I am using the basic =sum(b2:j2) for the 9 holes. Any assistance would be greatly appreciated! Thank you. |
Sum and If Function Problem with Excel 2007
Bill, thank you very much. I had it backwards with the quote/text thing.
You are the best. "T. Valko" wrote: Remove the quotes from around the numbers. When you quote numbers Excel evaluates them as text and text is ignored by the SUM function. Don't do like this: =IF(A1="x","1","0") Do like this: =IF(A1="x",1,0) =IF(A1=1,"x",0) Only text is quoted in formulas. -- Biff Microsoft Excel MVP "David" wrote in message ... Thanks, Bob. I am using the "1", "2" in my conditional statement. The numbers returned are from "0" to "8". "Bob Phillips" wrote: Is your conditional statement returning numbers that are really text, say "1", "2", instead of 1 or 2. SUM won't like these. -- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "David" wrote in message ... I am working with a golf score card. I have a conditional statement that gives points on a hole depending on the score. The If statements are working perfectly, however, I can not sum the points correctly. I have used $ with the column and row references and have taken the $ away and still receive the same figure, "0" or zero. I get the zero regardless of the figures in the conditional cells. I am using the basic =sum(b2:j2) for the 9 holes. Any assistance would be greatly appreciated! Thank you. |
Sum and If Function Problem with Excel 2007
You're welcome. Thanks for the feedback!
-- Biff Microsoft Excel MVP "David" wrote in message ... Bill, thank you very much. I had it backwards with the quote/text thing. You are the best. "T. Valko" wrote: Remove the quotes from around the numbers. When you quote numbers Excel evaluates them as text and text is ignored by the SUM function. Don't do like this: =IF(A1="x","1","0") Do like this: =IF(A1="x",1,0) =IF(A1=1,"x",0) Only text is quoted in formulas. -- Biff Microsoft Excel MVP "David" wrote in message ... Thanks, Bob. I am using the "1", "2" in my conditional statement. The numbers returned are from "0" to "8". "Bob Phillips" wrote: Is your conditional statement returning numbers that are really text, say "1", "2", instead of 1 or 2. SUM won't like these. -- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "David" wrote in message ... I am working with a golf score card. I have a conditional statement that gives points on a hole depending on the score. The If statements are working perfectly, however, I can not sum the points correctly. I have used $ with the column and row references and have taken the $ away and still receive the same figure, "0" or zero. I get the zero regardless of the figures in the conditional cells. I am using the basic =sum(b2:j2) for the 9 holes. Any assistance would be greatly appreciated! Thank you. |
All times are GMT +1. The time now is 09:05 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com