VLOOKUP Question

Bedford

Active Member
Joined
Feb 3, 2015
Messages
333
Office Version
  1. 365
Platform
  1. MacOS
Trying to bring contents from one worksheet into another using VLOOKUP and I need help with an error.

=IFERROR(VLOOKUP(C4,'Images'!$D$2:$D$40,MATCH(C4,'Images'!$D$2:$D$40,0),0,)))
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
Your formula is not making sense. The format for a VLookup is:
=vlookup(lookup_value, table_array, col_index_num, range_lookup)
You have a match statement where it is looking for a column index number. This should be looking in just 1 row being the header row.
Also for the column index to be anything other than 1 your table array would need to be more than one column (currently column D - $D$2:$D$40)
You might want to explain what you are trying to do and show an image of the data (include the column and row references)
 
Upvote 0
Your formula is not making sense. The format for a VLookup is:
=vlookup(lookup_value, table_array, col_index_num, range_lookup)
You have a match statement where it is looking for a column index number. This should be looking in just 1 row being the header row.
Also for the column index to be anything other than 1 your table array would need to be more than one column (currently column D - $D$2:$D$40)
You might want to explain what you are trying to do and show an image of the data (include the column and row references)
I ended up finding what I needed, not sure how to delete or pause a post once it's been up on the site? Thank you for responding, sorry I couldn't understand how to remove it before you visited.
 
Upvote 0
No problem. Appreciate you coming back and closing the loop on this.
If you want to post what you ended up using you can mark that post (your own) as a solution. It may help others.
 
Upvote 0
No problem. Appreciate you coming back and closing the loop on this.
If you want to post what you ended up using you can mark that post (your own) as a solution. It may help others.


Good idea about posting my solution, the formula that ended up working for me is this; =IFERROR(INDEX(Images!D:D, MATCH(D6, Images!E:E, 0)), "")
 
Upvote 0
In case it's of interest, since you have 365 the XLookup equivalent would be:
Excel Formula:
=XLOOKUP( D6, Images!E:E, Images!D:D, "")
Representing:
=xlookup( lookup_value, lookup_array, return_array, if_not_found)
 
Upvote 0
Slight difference between IFERROR vs. the [if_not_found] of XLOOKUP.
XLOOKUP can still return an error.
I know which is why strictly speaking you should not use IFERROR with a Vlookup or Index Match, you should use IFNA.
You really don't want to be masking errors other than the not found error which returns #NA.
 
Upvote 0
I know which is why strictly speaking you should not use IFERROR with a Vlookup or Index Match, you should use IFNA.
You really don't want to be masking errors other than the not found error which returns #NA.
My comment was aimed toward the OP for reconsidering using XLOOKUP :)
 
Upvote 0
Slight difference between IFERROR vs. the [if_not_found] of XLOOKUP.
XLOOKUP can still return an error.
Although IFERROR returned a black cell when D6 was left empty whereas XLOOKUP resulted in there being a "0" where the formula was entered, not a big issue, changing the zero view setting eliminated the "0".
 
Upvote 0

Forum statistics

Threads
1,224,885
Messages
6,181,587
Members
453,055
Latest member
cope7895

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