Using IFERROR with VLOOKUP

Whylucky

New Member
Joined
Sep 24, 2013
Messages
39
I am trying to find a way to pull info from a string and use that as a lookup_value for VLOOKUP. I cam up with the equation
Code:
=VLOOKUP(IFERROR(LEFT($C4,FIND("x",$C4,1)-2),"NA"),H4:I20,2,FALSE)
however it keeps returning an error. I know the VLOOKUP works and i know the IFERROR works, am i missing something when combining them? Any help will be greatly appreciated.

Regards,
Whylucky
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
If the IFERROR part fails, it's going to feed "NA" to the VLOOKUP part.

Can your VLOOKUP cope with that ?
 
Upvote 0
No the VLOOKUP wouldnt be able to handle the NA, however, as i stated ISERROR is correctly finding the right value but the VLOOKUP is still failing
 
Upvote 0
=IFERROR(VLOOKUP(LEFT($C4,FIND("x",$C4,1)-2),H4:I20,2,0),"NA")

If this is not what you need, try to specify what you have in C4.
 
Upvote 0
Yes that works better, but i still have the issue where the VLOOKUP can't process the number generated from the FIND function. Is there a reason or am i missing something on why this wont work?
 
Upvote 0
Yes that works better, but i still have the issue where the VLOOKUP can't process the number generated from the FIND function. Is there a reason or am i missing something on why this wont work?

LEFT returns text even if its input is a number.

Coercing/converting with +0

LEFT($C4,FIND("x",$C4,1)-2)+0

would make the LEFT result a number.
 
Upvote 0

Forum statistics

Threads
1,215,334
Messages
6,124,321
Members
449,154
Latest member
pollardxlsm

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top