Aure

New Member
Joined
Feb 21, 2012
Messages
3
Hello,

Here is what I have :

A B
2 -
4 5
5 -
6 7

What I need to do is a sum of the column A if <>#N/A" and "<>#DIV/0!
And In case the cell value B is not blank, replace the value in the corresponding A cell with the B cell value

In this case A column sum is 17 the sum I want is 19

Could anyone help?
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
Hello,

Here is what I have :

A B
2 -
4 5
5 -
6 7

What I need to do is a sum of the column A if <>#N/A" and "<>#DIV/0!
And In case the cell value B is not blank, replace the value in the corresponding A cell with the B cell value

In this case A column sum is 17 the sum I want is 19

Could anyone help?

Your sample does not cover your explanation. It lloks like you are summing column B, not A. If so:

Control+shift+enter, not just enter...

=SUM(IF(ISNUMBER(B2:B5),B2:B5,A2:A5))

assuming that there are no error values in A2:A5. Otherwise:

=SUM(IF(ISNUMBER(B2:B5),B2:B5,IF(ISNUMBER(A2:A5),A2:A5)))
 
Upvote 0
Your sample does not cover your explanation. It lloks like you are summing column B, not A. If so:

Control+shift+enter, not just enter...

=SUM(IF(ISNUMBER(B2:B5),B2:B5,A2:A5))

assuming that there are no error values in A2:A5. Otherwise:

=SUM(IF(ISNUMBER(B2:B5),B2:B5,IF(ISNUMBER(A2:A5),A2:A5)))


Maybe I was not clear enough
A B
1/ 5 -
2/ 6 -
3/ 3 6
4/ 2 -
5/ 1 3
6/ 0 1
7/#N/A -
8/#DIV/0! -

What I would like is the sum of the A column excluding #DIV/0! and #N/A
But if value is entered in the B column, remplace the value the corresponding A cell with the B cell.

So instead of having 17 (5+6+3+2+1) with the sum of the column A (as if value was not entered in the B column), I want to have 23 (5+6+6+2+3+1)

Tkx
 
Upvote 0
Hi
=SUM(IF(ISNUMBER(B1:B8),B1:B8,IF(ISNUMBER(A1:A8),A1:A8)))


You just have to change the cell range. That's all...


Aladin_Akyurek gave you the correct formula.
 
Upvote 0

Forum statistics

Threads
1,215,515
Messages
6,125,279
Members
449,220
Latest member
Excel Master

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