#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 61
Default VLOOKUP Condition

I'm trying to do a Vlookup where if it can't find the information in the
specified array, it returns a predetermined value...is there a way to do this?

Thanks!
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,203
Default VLOOKUP Condition

Yes, when VLookup() doesn't find a match, it returns #N/A error and you can
test for that:

=IF(ISNA(yourVlookupFormula),predeterminedValue,yo urVlookupFormula)

a real one might look like
=IF(ISNA(VLOOKUP(A1,Sheet2!B9:X109,3,False)),-55,VLOOKUP(A1,Sheet2!B9:X109,3,False))

You could even return text as:
=IF(ISNA(VLOOKUP(A1,Sheet2!B9:X109,3,False)),"No Match
Found",VLOOKUP(A1,Sheet2!B9:X109,3,False))

"lightbulb" wrote:

I'm trying to do a Vlookup where if it can't find the information in the
specified array, it returns a predetermined value...is there a way to do this?

Thanks!

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,939
Default VLOOKUP Condition

=if(isna(vlookup(...), "Predetermined Value", vlookup())

--
HTH...

Jim Thomlinson


"lightbulb" wrote:

I'm trying to do a Vlookup where if it can't find the information in the
specified array, it returns a predetermined value...is there a way to do this?

Thanks!

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default VLOOKUP Condition

hi,

2 ways

=IF(COUNTIF(A1:A20,F1)0,VLOOKUP(F1,A1:B20,2,FALSE ),"My Pre defined value")

or

=IF(ISNA(VLOOKUP(F1,A1:B20,2,FALSE)),"My pre defined
value",VLOOKUP(F1,A1:B20,2,FALSE))

Mike

"lightbulb" wrote:

I'm trying to do a Vlookup where if it can't find the information in the
specified array, it returns a predetermined value...is there a way to do this?

Thanks!

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
two condition for vlookup? shital shah Excel Worksheet Functions 4 August 2nd 06 11:11 PM
2 condition vlookup AZExcelNewbie Excel Discussion (Misc queries) 1 February 17th 06 11:02 PM
VLOOKUP used only when IF condition is met Bradley Excel Worksheet Functions 3 November 22nd 05 06:32 PM
Multi-condition vlookup Hobbeson Excel Worksheet Functions 4 July 19th 05 03:57 AM
vlookup in two condition val via OfficeKB.com Excel Discussion (Misc queries) 1 March 18th 05 09:12 AM


All times are GMT +1. The time now is 01:48 PM.

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

About Us

"It's about Microsoft Excel"