Sumif woes

SimonHughes

Well-known Member
Joined
Sep 16, 2009
Messages
507
Office Version
  1. 365
Platform
  1. Windows
Hi,

I am using Excel 2010

I am running a very simple formula to sum values in column C if the data in column A matched the value selected via a drop down box in cell B1. Trouble is it returns a 0. Could this be due to a formatting issue in the text?

Any help appreciated

=sumif(A:A,B1,C:C)
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
There are 3 likely cases for why you'd get your 0:

1) The conditional sum actually is 0
2) There are differences in text vs. numbers (e.g. A5 contains the text value "100" where B1 contains the number 100 or vice versa... in this case, consider changing your SUMIF formula to use B1&"" to convert from a number to text or B1+0 to convert from text to a number to make them consistent)
3) There may be leading or trailing spaces in column A's values. In this case, consider using =SUMIF(A:A,"*"&B1&"*",C:C) or similar, where the * is a wildcard
 
Upvote 0
...As a note to my post above, Aladin kindly reminded me that (2) doesn't matter for SUMIFs. VLOOKUPs and other functions have an issue when text/numbers don't match, but SUMIF is not plagued by that mismatch.
 
Upvote 0
Many thanks Oaktree. It was a trailing space soa quick trim solved that one. So simple!
 
Upvote 0

Forum statistics

Threads
1,224,503
Messages
6,179,134
Members
452,890
Latest member
Nikhil Ramesh

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top