A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

If condition not met get #N/A



 
 
Thread Tools Display Modes
  #1  
Old April 3rd, 2009, 04:40 AM posted to microsoft.public.excel.misc
Cefoxtrot
external usenet poster
 
Posts: 9
Default If condition not met get #N/A

Using the VLOOKUP function to merge data from two worksheets:
=vlookup(A2,sheet1!$A$2:$M$3000,13,FALSE)

It works fine, except that when there is no match, I get a #N/A on each as
the result. Is there a way to prevent the '#N/A' from displaying? Or replace
it blanks?

Thanks!
Cefoxtrot
  #2  
Old April 3rd, 2009, 04:48 AM posted to microsoft.public.excel.misc
Jacob Skaria
external usenet poster
 
Posts: 5,952
Default If condition not met get #N/A

Try.

=IF(ISNA(formula)=TRUE,"",formula)
--
If this post helps click Yes
---------------
Jacob Skaria


"Cefoxtrot" wrote:

Using the VLOOKUP function to merge data from two worksheets:
=vlookup(A2,sheet1!$A$2:$M$3000,13,FALSE)

It works fine, except that when there is no match, I get a #N/A on each as
the result. Is there a way to prevent the '#N/A' from displaying? Or replace
it blanks?

Thanks!
Cefoxtrot

  #3  
Old April 3rd, 2009, 05:02 AM posted to microsoft.public.excel.misc
Cefoxtrot
external usenet poster
 
Posts: 9
Default If condition not met get #N/A

That worked perfectly. Thank you so much!
Cefoxtrot


"Jacob Skaria" wrote:

Try.

=IF(ISNA(formula)=TRUE,"",formula)
--
If this post helps click Yes
---------------
Jacob Skaria


"Cefoxtrot" wrote:

Using the VLOOKUP function to merge data from two worksheets:
=vlookup(A2,sheet1!$A$2:$M$3000,13,FALSE)

It works fine, except that when there is no match, I get a #N/A on each as
the result. Is there a way to prevent the '#N/A' from displaying? Or replace
it blanks?

Thanks!
Cefoxtrot

  #4  
Old April 3rd, 2009, 05:21 AM posted to microsoft.public.excel.misc
T. Valko
external usenet poster
 
Posts: 15,759
Default If condition not met get #N/A

If you're using Excel 2007:

=IFERROR(VLOOKUP(A2,Sheet1!$A$2:$M$3000,13,0),"")

This works in any version:

=IF(COUNTIF(Sheet1$A$2:$A$3000,A2),VLOOKUP(A2,Shee t1!$A$2:$M$3000,13,0),"")


--
Biff
Microsoft Excel MVP


"Cefoxtrot" wrote in message
...
Using the VLOOKUP function to merge data from two worksheets:
=vlookup(A2,sheet1!$A$2:$M$3000,13,FALSE)

It works fine, except that when there is no match, I get a #N/A on each as
the result. Is there a way to prevent the '#N/A' from displaying? Or
replace
it blanks?

Thanks!
Cefoxtrot



  #5  
Old April 3rd, 2009, 09:43 PM posted to microsoft.public.excel.misc
Cefoxtrot
external usenet poster
 
Posts: 9
Default If condition not met get #N/A

Yes, this works too in Excel 2007.

Thanks a lot!
Cefoxtrot


"T. Valko" wrote:

If you're using Excel 2007:

=IFERROR(VLOOKUP(A2,Sheet1!$A$2:$M$3000,13,0),"")

This works in any version:

=IF(COUNTIF(Sheet1$A$2:$A$3000,A2),VLOOKUP(A2,Shee t1!$A$2:$M$3000,13,0),"")


--
Biff
Microsoft Excel MVP


"Cefoxtrot" wrote in message
...
Using the VLOOKUP function to merge data from two worksheets:
=vlookup(A2,sheet1!$A$2:$M$3000,13,FALSE)

It works fine, except that when there is no match, I get a #N/A on each as
the result. Is there a way to prevent the '#N/A' from displaying? Or
replace
it blanks?

Thanks!
Cefoxtrot




  #6  
Old April 4th, 2009, 02:40 AM posted to microsoft.public.excel.misc
T. Valko
external usenet poster
 
Posts: 15,759
Default If condition not met get #N/A

You're welcome. Thanks for the feedback!

--
Biff
Microsoft Excel MVP


"Cefoxtrot" wrote in message
...
Yes, this works too in Excel 2007.

Thanks a lot!
Cefoxtrot


"T. Valko" wrote:

If you're using Excel 2007:

=IFERROR(VLOOKUP(A2,Sheet1!$A$2:$M$3000,13,0),"")

This works in any version:

=IF(COUNTIF(Sheet1$A$2:$A$3000,A2),VLOOKUP(A2,Shee t1!$A$2:$M$3000,13,0),"")


--
Biff
Microsoft Excel MVP


"Cefoxtrot" wrote in message
...
Using the VLOOKUP function to merge data from two worksheets:
=vlookup(A2,sheet1!$A$2:$M$3000,13,FALSE)

It works fine, except that when there is no match, I get a #N/A on each
as
the result. Is there a way to prevent the '#N/A' from displaying? Or
replace
it blanks?

Thanks!
Cefoxtrot






 




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 01:24 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.