PC Review


Reply
Thread Tools Rate Thread

How can I get rid of all the #N/A that are in my spreadsheet?

 
 
amirstal
Guest
Posts: n/a
 
      8th Dec 2006
Is there a way to make all the #N/As in a spreadsheet disappear?

 
Reply With Quote
 
 
 
 
mike.thompson@agcocorp.com
Guest
Posts: n/a
 
      8th Dec 2006
I normally get the #NA Error from the VLookup Function. Use the "IF"
and "ISNA" functions to replace the error with some usable text. The
formula below will search Column A and return the value in the second
column if it finds a match for the value in cell C1 or the text "Not
Found" if there is no match.

=IF(ISNA(VLOOKUP(C2,$A$2:$B$6,2,FALSE)),"Not Found",
VLOOKUP(C2,$A$2:$B$6,2,FALSE))

The logical test of the IF statement is looking for the #NA error from
the VLOOKUP formula. If if returns the #NA error, the IF formula is
true and the true part is processed. If the error is not found, the
false part of the IF statement is processed, which just happens to be
the very same VLOOKUP formula.

The easiest I have found to make this work is to get the VLOOKUP
function working first then add the IF and ISNA formulas. That way I
know I do not have an issue the VLOOKUP formula.




amirstal wrote:
> Is there a way to make all the #N/As in a spreadsheet disappear?


 
Reply With Quote
 
amirstal
Guest
Posts: n/a
 
      11th Dec 2006
This is the actual formula I have:
=if(ac23="a",u23*vlookup(h23,rates!$a$1:$d$14,4),if(ac23="b",u23/vlookup(h23,rates!$a$1:$d$14,4),if(ac23="c",u23/vlookup(h23,rates!$a$1:$d$14,4))))
But I could not insert the ISNA in so it will work.
Can you help?

 
Reply With Quote
 
amirstal
Guest
Posts: n/a
 
      11th Dec 2006
Ok. It did work.
But now I got read of the #N/A and instead got #VALUE!.
How do I get rid of #VALUE!?


Thanks

(E-Mail Removed) wrote:
> I normally get the #NA Error from the VLookup Function. Use the "IF"
> and "ISNA" functions to replace the error with some usable text. The
> formula below will search Column A and return the value in the second
> column if it finds a match for the value in cell C1 or the text "Not
> Found" if there is no match.
>
> =IF(ISNA(VLOOKUP(C2,$A$2:$B$6,2,FALSE)),"Not Found",
> VLOOKUP(C2,$A$2:$B$6,2,FALSE))
>
> The logical test of the IF statement is looking for the #NA error from
> the VLOOKUP formula. If if returns the #NA error, the IF formula is
> true and the true part is processed. If the error is not found, the
> false part of the IF statement is processed, which just happens to be
> the very same VLOOKUP formula.
>
> The easiest I have found to make this work is to get the VLOOKUP
> function working first then add the IF and ISNA formulas. That way I
> know I do not have an issue the VLOOKUP formula.
>
>
>
>
> amirstal wrote:
> > Is there a way to make all the #N/As in a spreadsheet disappear?


 
Reply With Quote
 
Gord Dibben
Guest
Posts: n/a
 
      11th Dec 2006
Add the ISNA trap to all cells with this macro.

Sub NATrapAdd()
Dim myStr As String
Dim cel As Range
For Each cel In Selection
If cel.HasFormula = True Then
If Not cel.Formula Like "=IF(ISNA*" Then
myStr = Right(cel.Formula, Len(cel.Formula) - 1)
cel.Value = "=IF(ISNA(" & myStr & "),""""," & myStr & ")"
End If
End If
Next
End Sub


Gord Dibben MS Excel MVP

On 11 Dec 2006 06:46:34 -0800, "amirstal" <(E-Mail Removed)> wrote:

>This is the actual formula I have:
>=if(ac23="a",u23*vlookup(h23,rates!$a$1:$d$14,4),if(ac23="b",u23/vlookup(h23,rates!$a$1:$d$14,4),if(ac23="c",u23/vlookup(h23,rates!$a$1:$d$14,4))))
>But I could not insert the ISNA in so it will work.
>Can you help?


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sending a copy of spreadsheet to mailrecipient; mail adress indicatedin a cell in the spreadsheet Snoopy Microsoft Excel Discussion 4 21st Aug 2009 08:02 AM
Freeze Excel Spreadsheet till template open first then spreadsheet learning_codes@hotmail.com Microsoft Excel Discussion 1 26th Oct 2008 03:56 PM
Is there a way to insert a formula, password or macro in an excel spreadsheet that will automatically delete the spreadsheet? oil_driller Microsoft Excel Misc 1 8th Feb 2005 09:34 AM
How to save an Excel spreadsheet as a Microsoft Works Spreadsheet file Shelly Microsoft Excel Misc 1 7th May 2004 02:04 AM
Re: How to open another Excel spreadsheet to copy data into current spreadsheet ? Ricky Pang Microsoft Excel Programming 0 13th Jul 2003 01:59 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:07 PM.