ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   sumif wrong result (https://www.excelbanter.com/excel-worksheet-functions/62294-sumif-wrong-result.html)

tallyman00

sumif wrong result
 

I am trying to sum cells across a row, if the corresponding cell in
another row, the same column, has an “A”. I am getting incorrect
results. Why? Here is my formula: =SUMIF($C$4:$N$4,"A",C9:N9)

Thanks


--
tallyman00
------------------------------------------------------------------------
tallyman00's Profile: http://www.hightechtalks.com/m617
View this thread: http://www.hightechtalks.com/t2318593


Bob Phillips

sumif wrong result
 
It works fine in my tests. What data gives incorrect results?

--

HTH

RP
(remove nothere from the email address if mailing direct)


"tallyman00" wrote in
message ...

I am trying to sum cells across a row, if the corresponding cell in
another row, the same column, has an "A". I am getting incorrect
results. Why? Here is my formula: =SUMIF($C$4:$N$4,"A",C9:N9)

Thanks


--
tallyman00
------------------------------------------------------------------------
tallyman00's Profile: http://www.hightechtalks.com/m617
View this thread: http://www.hightechtalks.com/t2318593




Bernard Liengme

sumif wrong result
 
This works for me. I tried =SUMIF($C$4:$G$4,"A",C9:G9)
What is wrong with the result?
Could it be that one or more "A" values are in fact something like "A ";
try =SUMPRODUCT(--(TRIM(C4:G4)="A"),C9:G9)

Could one or more numbers actually be text? Try in a helper row
=ISNUMBER(C9) .... etc

--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

"tallyman00" wrote in
message ...

I am trying to sum cells across a row, if the corresponding cell in
another row, the same column, has an “A”. I am getting incorrect
results. Why? Here is my formula: =SUMIF($C$4:$N$4,"A",C9:N9)

Thanks


--
tallyman00
------------------------------------------------------------------------
tallyman00's Profile: http://www.hightechtalks.com/m617
View this thread: http://www.hightechtalks.com/t2318593




tallyman00

sumif wrong result
 

This spreadsheet is budget that shows projected and actual
expenditures.
On Row 4 I have either an "A" or a "P" for each month of the year. For
rows below 4 I have different types of expenditures. They are all
numbers. For each of those rows I am testing the corresponding cell on
row 4 to see if it is an "A" or "P". If I just do a sum for the columns
that I know that I have an "A" or use my calculator, I get a different
result than when I use sumif. I don't understand why sumif isn't giving
me accurate data.


--
tallyman00
------------------------------------------------------------------------
tallyman00's Profile: http://www.excelforum.com/member.php...o&userid=29971
View this thread: http://www.excelforum.com/showthread...hreadid=496639


Bob Phillips

sumif wrong result
 
Can you give us the data and tell us what answer that you get so that we can
test it?

--

HTH

RP
(remove nothere from the email address if mailing direct)


"tallyman00" wrote
in message ...

This spreadsheet is budget that shows projected and actual
expenditures.
On Row 4 I have either an "A" or a "P" for each month of the year. For
rows below 4 I have different types of expenditures. They are all
numbers. For each of those rows I am testing the corresponding cell on
row 4 to see if it is an "A" or "P". If I just do a sum for the columns
that I know that I have an "A" or use my calculator, I get a different
result than when I use sumif. I don't understand why sumif isn't giving
me accurate data.


--
tallyman00
------------------------------------------------------------------------
tallyman00's Profile:

http://www.excelforum.com/member.php...o&userid=29971
View this thread: http://www.excelforum.com/showthread...hreadid=496639




Bernard Liengme

sumif wrong result
 
Intrigued, send file to my private email
--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

"tallyman00" wrote
in message ...

This spreadsheet is budget that shows projected and actual
expenditures.
On Row 4 I have either an "A" or a "P" for each month of the year. For
rows below 4 I have different types of expenditures. They are all
numbers. For each of those rows I am testing the corresponding cell on
row 4 to see if it is an "A" or "P". If I just do a sum for the columns
that I know that I have an "A" or use my calculator, I get a different
result than when I use sumif. I don't understand why sumif isn't giving
me accurate data.


--
tallyman00
------------------------------------------------------------------------
tallyman00's Profile:
http://www.excelforum.com/member.php...o&userid=29971
View this thread: http://www.excelforum.com/showthread...hreadid=496639




tallyman00

sumif wrong result
 

Thank you everybody for your help. Apparently their was something other
than just an “A” in one or more of my test columns. When I used
Bernard’s formula with the sumproduct and trim, it worked perfectly. I
tried to use the trim in the sumif, but I guess that I didn’t have the
format right. In any event, when I went back and put a new “A” in each
column, then sumif worked correctly too.


--
tallyman00
------------------------------------------------------------------------
tallyman00's Profile: http://www.excelforum.com/member.php...o&userid=29971
View this thread: http://www.excelforum.com/showthread...hreadid=496639



All times are GMT +1. The time now is 11:46 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com