Sum with error

vonatron

New Member
Joined
Nov 8, 2010
Messages
1
Hello all,

I'm having an issue trying to do what I thought was simple sum formula. I want to create a formula where I can sum the cells while ignoring the #N/A values. An additional problem is that the cells that I want to add are not consecutive.

For example, I want the sum of A1, D1, G1, J1.
However, G1=#N/A, so the total sum is coming up #N/A as well.
I do not want to place an iserror formula into each of A1, D1, G1, J1 because there are way too many cells with additional formulas.

Is there a way do to this?

Thanks!!
-Von
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
=SUM(IF(MOD(COLUMN($A$1:$J$1)-COLUMN($A$1),3)=0,IF(ISNUMBER($A$1:$J$1),$A$1:$J$1)))

Confirm with CTRL-SHIFT-ENTER rather than just Enter.
 
Upvote 0
Hello all,

I'm having an issue trying to do what I thought was simple sum formula. I want to create a formula where I can sum the cells while ignoring the #N/A values. An additional problem is that the cells that I want to add are not consecutive.

For example, I want the sum of A1, D1, G1, J1.
However, G1=#N/A, so the total sum is coming up #N/A as well.
I do not want to place an iserror formula into each of A1, D1, G1, J1 because there are way too many cells with additional formulas.

Is there a way do to this?

Thanks!!
-Von

The relevant cells appear equally spaced. If this is true...

Ocontrol+shift+enter, not just enter:

=SUM(IF(MOD(COLUMN(A1:J1)-COLUMN(A1),3)=0,IF(ISNUMBER(A1:J1),A1:J1)))
 
Upvote 0
Another option:

Code:
=SUM(SUMIF(INDIRECT({"A1","D1","G1","J1"}),">0",INDIRECT({"A1","D1","G1","J1"})))

Though this does employ the volatile INDIRECT function.

Matty
 
Upvote 0
Another option:

Code:
=SUM(SUMIF(INDIRECT({"A1","D1","G1","J1"}),">0",INDIRECT({"A1","D1","G1","J1"})))

Though this does employ the volatile INDIRECT function.

Matty

Moreover and more importantly: 1. {"A1","D1","G1","J1"} requires manual construction; 2. INDIRECT also anchors (inflexibly) the relevant cells.
 
Upvote 0
1. {"A1","D1","G1","J1"} requires manual construction

Granted.

Code:
2. INDIRECT also anchors (inflexibly) the relevant cells.

Indeed, this does become a problem if the OP intends to "copy down" said formula, though this wasn't mentioned in their post.

For what it's worth, I would always opt for a formula similar to what HOTPEPPER and yourself posted given equally spaced data, but I see no harm in informing the OP of an alternative option if it suits their needs.

Matty
 
Upvote 0

Forum statistics

Threads
1,214,923
Messages
6,122,289
Members
449,077
Latest member
Rkmenon

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