ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   how can I ignore or hide the #N/A when doing a sum or subtotal? (https://www.excelbanter.com/excel-worksheet-functions/135853-how-can-i-ignore-hide-n-when-doing-sum-subtotal.html)

Jules73

how can I ignore or hide the #N/A when doing a sum or subtotal?
 
I have a list of products on drop downs (validation) which also populates a
cell next to it with its base cost. However if nothing is selected it shows
as #N/A. At the bottom of the list is a subtotal which works if it only looks
at cells with numbers. If it see an #N/A it doesnt total the ones that have
been populated. How can I get the subtotal to ignore blanks or #N/A? How do I
get it to show Blanks in stead of #N/A for that matter?

Thanks in advance.

Toppers

how can I ignore or hide the #N/A when doing a sum or subtotal?
 


=SUMIF(I1:I5,"<#N/A")

To remove #N/A you need something like:

=IF(ISNA(myformula),"",myformula)

HTH

"Jules73" wrote:

I have a list of products on drop downs (validation) which also populates a
cell next to it with its base cost. However if nothing is selected it shows
as #N/A. At the bottom of the list is a subtotal which works if it only looks
at cells with numbers. If it see an #N/A it doesnt total the ones that have
been populated. How can I get the subtotal to ignore blanks or #N/A? How do I
get it to show Blanks in stead of #N/A for that matter?

Thanks in advance.


pwk

how can I ignore or hide the #N/A when doing a sum or subtotal?
 
On Mar 21, 3:33 pm, Jules73 wrote:
I have a list of products on drop downs (validation) which also populates a
cell next to it with its base cost. However if nothing is selected it shows
as #N/A. At the bottom of the list is a subtotal which works if it only looks
at cells with numbers. If it see an #N/A it doesnt total the ones that have
been populated. How can I get the subtotal to ignore blanks or #N/A? How do I
get it to show Blanks in stead of #N/A for that matter?

Thanks in advance.


I had the same problem. You need to use ISERROR in your formula.


Billy Liddel

how can I ignore or hide the #N/A when doing a sum or subtotal?
 
"Jules73" wrote:

I have a list of products on drop downs (validation) which also populates a
cell next to it with its base cost. However if nothing is selected it shows
as #N/A. At the bottom of the list is a subtotal which works if it only looks
at cells with numbers. If it see an #N/A it doesnt total the ones that have
been populated. How can I get the subtotal to ignore blanks or #N/A? How do I
get it to show Blanks in stead of #N/A for that matter?


Jules
I'm not sure if this will do but this UDF will ignore errors and sum the range

Function SumErrRange(range) As Double
Dim c, myTotal As Double
For Each c In range
If IsNumeric(c) Then
myTotal = myTotal + c
End If
Next
SumErr = myTotal
End Function

Hope this works for you
Peter

Gord Dibben

how can I ignore or hide the #N/A when doing a sum or subtotal?
 
Which hides all errors, not just #N/A

It is better to trap the error at the source rather than deal with it later.

See Toppers' reply.


Gord Dibben MS Excel MVP

On 21 Mar 2007 13:24:47 -0700, "PWK" wrote:

I had the same problem. You need to use ISERROR in your formula.




All times are GMT +1. The time now is 02:25 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com