Excel; vlookups without #N/A
Thread Starter
Scooby Regular
Joined: Oct 2002
Posts: 565
Likes: 1
From: ex UK [SE], now Sunshine State [QLD,AUS]
When you do a vlookup, and the variable you are are looking for does not exist in the lookup area, then you get the #N/A code.
#N/A meaning value not available, because it is not there.
I know you can nest the 'vlookup' in an 'if' function, so that if true the vlookup happens, and if false 'zero' is returned.
Problem;
The 'if' statement uses something like 'iserror' or 'isnumber' as the condition to determine true/false.
I've tried but can not create the working formula, and time is against me.
Anyone know the correct formula ??
Just to summerise, I want a vlookup formula that returns the value if available, or zero if not available, instead of the #N/A if not available as at present.
Help !!
#N/A meaning value not available, because it is not there.
I know you can nest the 'vlookup' in an 'if' function, so that if true the vlookup happens, and if false 'zero' is returned.
Problem;
The 'if' statement uses something like 'iserror' or 'isnumber' as the condition to determine true/false.
I've tried but can not create the working formula, and time is against me.
Anyone know the correct formula ??
Just to summerise, I want a vlookup formula that returns the value if available, or zero if not available, instead of the #N/A if not available as at present.
Help !!
Use the ISNA function:
e.g. = if(ISNA(vlookup(A1,Sheet2!A:B,2,false)),"MISSING", vlookup(A1,Sheet2!A:B,2,false))
This says that if the vlookup returns ISNA, the cell says "MISSING". You can replace this MISSING with different values.
See the help file for more on the IS functions.
Martin.
e.g. = if(ISNA(vlookup(A1,Sheet2!A:B,2,false)),"MISSING", vlookup(A1,Sheet2!A:B,2,false))
This says that if the vlookup returns ISNA, the cell says "MISSING". You can replace this MISSING with different values.
See the help file for more on the IS functions.
Martin.
Thread
Thread Starter
Forum
Replies
Last Post
Mattybr5@MB Developments
Full Cars Breaking For Spares
28
Dec 28, 2015 11:07 PM
Mattybr5@MB Developments
Full Cars Breaking For Spares
12
Nov 18, 2015 07:03 AM
bluebullet29
General Technical
9
Oct 5, 2015 02:17 PM



