SUMIF based upon values in range of numbers

bsd9197

Board Regular
Joined
Nov 18, 2002
Messages
111
Trying to create a sumif formula that will sumif if a range of data contains a real number. So if I have a range of five numbers like this:

10
20

30
10

It should return the sum (70)

It should also return a sum if one of my numbers is zero:

0

0

0
0

Value = 0

If a number is negative, it should also sum, but if no numbers are included in the range of values my answer should be blank.

Thanks for your continued support! I don't know what I'd do without this board!

Brian
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
This is confusing. Why do you mention SumIf while your examples can simply be covered with a Sum formula? The only thing I can gather is the wish to distinguish between a real 0 sum and a 0 sum as result of completely empty range.
 
Upvote 0
Aladin Akyurek said:
This is confusing. Why do you mention SumIf while your examples can simply be covered with a Sum formula? The only thing I can gather is the wish to distinguish between a real 0 sum and a 0 sum as result of completely empty range.

Aladin,

You are exactly correct in what I trying to accomplish. For each line there are three possiblities:

Dec Jan Feb Mar Apr May Jun Jul Result

A set of real numbers:
10 20 0 -10 20

Another example of a set of real numbers
0 -20 -20

No numbers at all: (In this case the result should be blank)

Keep in mind that numbers fall in random months so I would not want to reference one cell. This is why I'm thinking SUMIF might be my best option. If you or someone else might work be more effective, please let me know. I apologize for the confusion.

Thanks,
Brian
 
Upvote 0

Forum statistics

Threads
1,213,546
Messages
6,114,251
Members
448,556
Latest member
peterhess2002

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