#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 106
Default Vlookup Problem

My Vlookup formula is:

=VLOOKUP(D81,'Week 2 Dataset'!G:O,9,0)

How would I write this differently so that when a result doesnt match i get
the cell to be left blank instead of #NA?

I need to incoprate an if but am not sure how to write it?

Thanks!


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,058
Default Vlookup Problem

=IF(ISERROR(VLOOKUP(D81,'Week 2 Dataset'!G:O,9,0)),"",VLOOKUP(D81,'Week 2
Dataset'!G:O,9,0))

--
Gary''s Student - gsnu200791
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Vlookup Problem

Another one:

=IF(COUNTIF('Week 2 Dataset'!G:G,D81),VLOOKUP(D81,'Week 2
Dataset'!G:O,9,0),"")

If you're using Excel 2007:

=IFERROR(VLOOKUP(D81,'Week 2 Dataset'!G:O,9,0),"")

Note that this will trap *all* errors, not just #N/A.


--
Biff
Microsoft Excel MVP


"Belinda7237" wrote in message
...
My Vlookup formula is:

=VLOOKUP(D81,'Week 2 Dataset'!G:O,9,0)

How would I write this differently so that when a result doesnt match i
get
the cell to be left blank instead of #NA?

I need to incoprate an if but am not sure how to write it?

Thanks!




  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,388
Default Vlookup Problem

Hi Biff,
I've seen you do this a couple of times lately - ie use an IF function
without an operator in the criteria. In this case, when the COUNTIF returns
1, the first option is chosen; when it returns 0, the second option is
chosen. Does the IF function just recognize a zero as FALSE, and anything
else as TRUE?.
Regards - Dave.

"T. Valko" wrote:

Another one:

=IF(COUNTIF('Week 2 Dataset'!G:G,D81),VLOOKUP(D81,'Week 2
Dataset'!G:O,9,0),"")




  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 106
Default Vlookup Problem

thank you all for your help - in using this formula and copying it down the
column, it seems to work on the items that are NA, however, the items that
have a value instead of returning the looked up value return NA?

"Gary''s Student" wrote:

=IF(ISERROR(VLOOKUP(D81,'Week 2 Dataset'!G:O,9,0)),"",VLOOKUP(D81,'Week 2
Dataset'!G:O,9,0))

--
Gary''s Student - gsnu200791

  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Vlookup Problem

Does the IF function just recognize a zero as FALSE,
and anything else as TRUE?.


Well, not "anything else".

0 is evaluated as FALSE and *any number other than 0* is evaluated as TRUE.

0 = FALSE
1 = TRUE
-1.0255678 = TRUE
0.000000001 = TRUE
100000 = TRUE
TEXT = #VALUE! error

--
Biff
Microsoft Excel MVP


"Dave" wrote in message
...
Hi Biff,
I've seen you do this a couple of times lately - ie use an IF function
without an operator in the criteria. In this case, when the COUNTIF
returns
1, the first option is chosen; when it returns 0, the second option is
chosen. Does the IF function just recognize a zero as FALSE, and anything
else as TRUE?.
Regards - Dave.

"T. Valko" wrote:

Another one:

=IF(COUNTIF('Week 2 Dataset'!G:G,D81),VLOOKUP(D81,'Week 2
Dataset'!G:O,9,0),"")




  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,388
Default Vlookup Problem

Thanks - Dave.
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
VLOOKUP Problem Leslie Excel Worksheet Functions 5 April 10th 08 06:43 PM
VLOOKUP problem GKW in GA Excel Discussion (Misc queries) 2 April 8th 08 06:47 PM
Vlookup problem SoCal Rick Excel Worksheet Functions 1 November 1st 07 04:06 AM
Vlookup problem Graham Haughs Excel Worksheet Functions 3 February 1st 06 07:54 PM
vlookup problem idcreek Excel Worksheet Functions 4 May 24th 05 01:07 PM


All times are GMT +1. The time now is 12:27 PM.

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

About Us

"It's about Microsoft Excel"