Simple Addition to ignore #Value & #Div/0!

ExcelRoy

Well-known Member
Joined
Oct 2, 2006
Messages
2,540
Office Version
  1. 365
Platform
  1. Windows
Hi All,

I am looking for a simple addition formula to calculate cells G5:G1004 but ignoring the #Value & #Div/0!

Thanks
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
If there are no negative numbers, then you can use

=SUMIF(G5:G1004,">0")

If there are negatives, then
=SUM(SUMIF(G5:G1004,{"<0",">0"}))
 
Upvote 0
Hi Jonmo,

I am just trying to learn something from someone more knowledgeable than myself.....

1. why the need for the {} to take the criteria for the sumif and not just ()?
2. why do you need to sum the sumif?


thanks

FarmerScott
2.
 
Upvote 0
If you are using Excel 2010 or later you can use AGGREGATE function like this

=AGGREGATE(9,6,G5:G1004)

The 9 indicates "SUM" and the 6 indicates that errors should be ignored
 
Upvote 0
The combination of the {} and the SUM makes it process like an array.
It basically creates 2 simif formulas, 1 for <=0, another for >=0
The SUM sums the result of the 2.
 
Upvote 0
Hi Jonmo,

thanks for that.

Does sumif only take 1 criteria? Does your fcombination of formula/s then allow you to do 2 or more? Is that what you were thinking?

i need to get a better handle on arrays than I do.

can you think of any other formulas that you could use in the same context?

cheers

FarmerScott
 
Upvote 0
Yes, And Yes.

Sumif only takes 1 criteria.
This formula syntax allows multiple criteria
But it's not as flexible as you might be hoping.
It can only do an OR type of criteria, and on the same column of data.

So basically you can do If ColA = "A" or "B" or "C" etc..
But you can't do
If ColA = "A" and/or ColB = "A"
 
Upvote 0
can you think of any other formulas that you could use in the same context?

cheers
FarmerScott

Yes, you can do countif (same as sumif)
And you can do vlookup...this is actually pretty cool

=SUM(VLOOKUP(A1,B:D,{2,3},FALSE))
However, this must be array entered with CTRL+SHIFT+ENTER
 
Upvote 0

Forum statistics

Threads
1,214,944
Messages
6,122,387
Members
449,080
Latest member
Armadillos

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