SUMIF Not blank

RJB78

Board Regular
Joined
Aug 8, 2016
Messages
69
Office Version
  1. 365
Hello. I have a set of account program titles(B) and a dollar value(J) and for some accounts there is not a program title and the cell is blank or empty (not sure what definition fits this situation, there is no formula in the cell). I would like to sum all of the dollar values for which there is a program title. I tried using =SUMIF(B34:B5000,"<>"&"",J34:J5000) but it returned the total dollar value for all accounts (even without a program title).

What can I use to sum the dollar values beginning in if that account is in a program?

Thank you in advance
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
It sounds like those cells are not really empty, but have something in them (like a space or special character).
Find one of these apparent "blank" cells. Let's say it is B50. Then see what this formula returns:
=LEN(B50)

If it returns anything other than 0, then your "blank" cells are not really blank, and that is why your formula is not working the way you want.
 
Upvote 0
That does not make sense to me. Then your SUMIF formula should work.
I tested out the EXACT equation you posted, and it ignore all rows with blanks in column B in the SUM.
 
Upvote 0
Playing around with this I found that with the posted formula if I put ="" in a cell in column B it still counts the row.
However this formula no longer counts that row
Code:
=SUMPRODUCT(--(B34:B5000<>""),J34:J5000)

not sure why the same condition would produce different results
 
Upvote 0
If the Program Titles are text entries, not numeric:

=SUMIF(B34:B5000,"?*",J34:J5000)

Regards
 
Upvote 0
Thank you all, the program titles are text entries, so XOR LX advice worked perfectly. I apologize for not saying that in my original post.

Thank you.
 
Upvote 0

Forum statistics

Threads
1,223,767
Messages
6,174,395
Members
452,561
Latest member
amir5104

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