VLOOKUP - used with INDIRECT...

Aitch

Board Regular
Joined
Jan 27, 2019
Messages
119
Office Version
  1. 2010
Platform
  1. Windows
Would be grateful for some help please!

I'm using this formula

=VLOOKUP (I2 , OLD!H$2 : OLD!M$2000 , 6 , FALSE)


I'd like to be able to input different values into the formula by using cells A1 A2 A3 A4 like this:
A1 = the I in I2
A2 = the H in OLD!H$2
A3 = the M in OLD!M$2000
A4 = the 6

How do I use INDIRECT properly to make this work, all my attempts keep showing an error!

=VLOOKUP (INDIRECT(A1)&"2 , OLD!"&(A2)&"$2 : OLD!"&(A3)&"$2000 ,"&(A4) ", FALSE")

Thank you!
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
I would advise against using the indirect function in this way, especially if you are going to have a lot of cells with the Vlookup function.
Indirect is volatile & recalculates whenever any other cell changes, this in turn can potentially cause your workbook to slow down significantly.
 
Upvote 0
I would advise against using the indirect function in this way, especially if you are going to have a lot of cells with the Vlookup function.
Indirect is volatile & recalculates whenever any other cell changes, this in turn can potentially cause your workbook to slow down significantly.

Dang, so that's why lol! I use INDIRECT quite often and yes, my sheet is pretty slow...

Is there any other way to do this?
 
Upvote 0
How about
=VLOOKUP(INDIRECT(A1&"2"), INDIRECT("OLD!"&A2&"$2:"&A3&"$2000"),A4, FALSE)
 
Upvote 0
How about
=VLOOKUP(INDIRECT(A1&"2"), INDIRECT("OLD!"&A2&"$2:"&A3&"$2000"),A4, FALSE)

Thank you so much bro!

I amended your formula so it uses the V column and added some $ to fix certain cells...

=IFERROR (VLOOKUP(INDIRECT(V$11& "2"), INDIRECT("OLD!"&V$12&"$2:"&V$13&"$2000"),V$14, FALSE) ,0)

It works perfectly - but when I try to copy the formula down to the rest of the column, it doesn't automatically increase the value of the Red highlighted value

I tried removing the " " but no joy... how do I make it copy down like this?

=IFERROR (VLOOKUP(INDIRECT(V$11& 2), INDIRECT("OLD!"&V$12&"$2:"&V$13&"$2000"),V$14, FALSE) ,0)
=IFERROR (VLOOKUP(INDIRECT(V$11& 3), INDIRECT("OLD!"&V$12&"$2:"&V$13&"$2000"),V$14, FALSE) ,0)
=IFERROR (VLOOKUP(INDIRECT(V$11& 4), INDIRECT("OLD!"&V$12&"$2:"&V$13&"$2000"),V$14, FALSE) ,0)
 
Upvote 0
How about
=IFERROR (VLOOKUP(INDIRECT(V$11& ROW(A2)), INDIRECT("OLD!"&V$12&"$2:"&V$13&"$2000"),V$14, FALSE) ,0)
 
Upvote 0
How about
=IFERROR (VLOOKUP(INDIRECT(V$11& ROW(A2)), INDIRECT("OLD!"&V$12&"$2:"&V$13&"$2000"),V$14, FALSE) ,0)

Perfect, I'm very grateful!


Can I quickly ask one more - I can never get the " and & right with strings... how do I make the highlighted in to a cell reference V$2?

=IFERROR(IF(VLOOKUP(NEW!X$2 &" "& V3 , NEW!A$2:A ,1,FALSE)=NEW!X$2 &" "& V3,NEW!X$2,""),"")


I tried these but with no luck...

=IFERROR(IF(VLOOKUP(NEW!X$ & V$2 &" "& V3 , NEW!A$2:A ,1,FALSE)=NEW!X$2 &" "& V3,NEW!X$2,""),"")

=IFERROR(IF(VLOOKUP(INDIRECT("NEW!X$" & V$2 &" "& V3) , NEW!A$2:A ,1,FALSE)=NEW!X$2 &" "& V3,NEW!X$2,""),"")
 
Upvote 0
Considering those formulae make absolutely no-sense, I have no idea.
 
Upvote 0

Forum statistics

Threads
1,214,792
Messages
6,121,612
Members
449,038
Latest member
apwr

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