Sum while getting #N/A

hsandeep

Well-known Member
Joined
Dec 6, 2008
Messages
1,226
Office Version
  1. 2010
Platform
  1. Windows
  2. Mobile
i want to sum a column. It also contains #N/A.
Also, i want to count the number of occurrences of values in the column (values can be alphabets, numerical or alpha-numerical) but it should not count #N/A.
How to accomplish it?
thanks
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
Assuming you are dealing with a range from B1 to B100
Try,
=SUM(IF(ISNA(B1:B100),0,B1:B100))
The formula needs to be ARRAY ENTERED i.e. CTRL + SHIFT + ENTER
and counting formula will be:
=COUNTIF(B1:B100,"<>#N/A")
 
Upvote 0
Assuming you are dealing with a range from B1 to B100
Try,
=SUM(IF(ISNA(B1:B100),0,B1:B100))
The formula needs to be ARRAY ENTERED i.e. CTRL + SHIFT + ENTER
and counting formula will be:
=COUNTIF(B1:B100,"<>#N/A")
Just pls explain: what does <> really goes into meaningfully in Excel?
 
Upvote 0
<> means does not equal.

Here are some alternatives:

The sum (numerics only)
=SUMIF(B1:B100,"<="&9.99E+307)

The count (anything except #N/A)
=COUNTA(B1:B100)-COUNTIF(B1:B100,NA())
 
Upvote 0
<> means does not equal.

Here are some alternatives:

The sum (numerics only)
=SUMIF(B1:B100,"<="&9.99E+307)

The count (anything except #N/A)
=COUNTA(B1:B100)-COUNTIF(B1:B100,NA())

Sir, it works. But what will happen if a alphabet is punched in B1:B100? Will this formula count this wrong entry also? I want to sum only numeric values appearing. I can clarify further, if needed.
 
Upvote 0
Sir, it works. But what will happen if a alphabet is punched in B1:B100? Will this formula count this wrong entry also? I want to sum only numeric values appearing. I can clarify further, if needed.

The sum formula will only sum numbers.
The count formula will count anything except for #N/A values.

Why don't you test this for yourself in your worksheet? If this is not what you want then you'll need to elaborate further and provide appropriate examples.
 
Upvote 0
Sir,
I tried. The =COUNTA(B1:B100)-COUNTIF(B1:B100,NA()) formula is also counting blanks generated due to cells having formulas containing "". It SHOULD NOT COUNT these blank values.
Please help.
Regards,
 
Upvote 0
The sum (numerics only)
=SUMIF(B1:B100,"<="&9.99E+307)
I had been using this formula to get the TOTAL. But when I sorted the values, TOTAL got changed!!!. The TOTAL has to remain same even after sorting. How to accomplish?
 
Upvote 0

Forum statistics

Threads
1,223,275
Messages
6,171,121
Members
452,381
Latest member
Nova88

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