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)
 
The original question was intended to be generic - I was not expecting the problem to become so difficult
Therein lies the danger, a trap that many people fall into. Oversimplifying your problem can lead to answers which work for your oversimplification, but not your actual problem!
For that reason, it is generally advised to not oversimplify the issue.

I also posted a screenshot (.jpg) of said spreadsheet for those who did not want to download a spreadsheet
The same security policy which prevents me from downloading files from the internet also blocks many sites that host images, so I cannot see that image contained in that link either.

There are two ways to let me know what is in those cells:
1. Post a screenshot using the tools mentioned in Section B here,
2. Answer the last two questions I posted in my last post

If you are unwilling to do either of those things, I am afraid there is nothing I can do for you.
 
Last edited:
Upvote 0

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
If you are unwilling to do either of those things, I am afraid there is nothing I can do for you.

I know life is going to be really hard but sadly I shall just have to muddle through somehow without the benefit of your advice.

Thank you for your interest.
 
Upvote 0

Forum statistics

Threads
1,224,827
Messages
6,181,198
Members
453,022
Latest member
RobertV1609

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