Sum if not blank

RincewindWIZZ

Board Regular
Joined
Feb 22, 2005
Messages
81
So I have the following data:
A1:A10 all contain 1 (for simplicity)
B1 to B10 contains formula that evaluate either to a number or to ""
Lets say 8 evaluate to a number (some of which are 0) and 2 evaluate to ""


I want to sum all the cells in A for which the corresponding cell in B is not "" so I tried
SUMIF(A1:A10,criterion,B1:B10)

Criterion Result
"". . . . . . . . gives . . . 2
"<>" . . . . . .gives. . . 10
"<>"&"". . . .gives. . . 10
">""". . . . . .gives. . . .0
">=""". . . . gives. . . .0
">"&"". . . . gives. . . . 0
"<>"&C1. . .gives. . . 10 (c1 contains ="")
So what criterion should I use?

(OK there are other ways I can do this but it seems odd to me that I cannot find an appropriate criterion for SUMIF)
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
What exactly what is the formula you are using in column B?
 
Upvote 0
I also think that you have the ranges the wrong way round. The first range is the criteria range & the second is the range to sum.
 
Upvote 0
=COUNTIFS(A1:A10,1,B1:B10,"<>")

looks more likely. Otherwise post a sample along with conditions and the result that must obtain.
 
Upvote 0
You cannot upload files to this site. But there are tools you can use to post screen images. They are listed in Section B of this link here: http://www.mrexcel.com/forum/board-a...forum-use.html.
Also, there is a Test Here forum on this board that you can use to test out these tools to make sure they are working correctly before using them in your question.

Otherwise, you would have to upload a file to a public file sharing site and post the link here.
Note though, many people are unable or unwilling to download files off of the internet for security reasons.
 
Upvote 0
OK so it seems I have to do it this way

url]


So the question is what criterion do I put into the SUMIF formula in D4 to give the answer 6 which is the sum of the entries in Col B for which Col C is not blank
 
Upvote 0

Excel 2013/2016
BCD
4116
52
61
720
810
921
Dont Delete
Cell Formulas
RangeFormula
D4=SUMIF(C4:C9,"<>",B4:B9)
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,279
Members
452,630
Latest member
OdubiYouth

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