Subtotal not working with #N/A in the cell

G

Guest

I have a hllookup formula that provides certain results as #N/A....I
understand why I get a #N/A, however, I need to subtotal the row. I tried to
use the subtotal formula, but it does not recognize #N/A as a number,
obviously cause it is not a number. I need to add these up for example:
10, 20, #N/A, #N/A, Subtotal: 30

How can I convert the #N/A so that they are "0" or blank so that my formula
works?

Thanks!
 
D

Dave Peterson

=if(iserror(hlookup(...)),0,hlookup(...))
=if(iserror(hlookup(...)),"",hlookup(...))

to return 0 or to return an empty string (cell looks empty).
 
N

Nick Hodge

In the originating HLOOKUP use an IF(ISNA...combination

=IF(ISNA(YourHLOOKUP),0,YourHLOOKUP))

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
(e-mail address removed)
www.nickhodge.co.uk


"Send Object Command - Two attachments"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top