VLOOKUP and return string + INDIRECT relative to where initial VLOOKUP runs

sarkocreme

New Member
Joined
Dec 14, 2009
Messages
9
I have a table that looks like this:
refrigerator
=vlookup(randbetween(1,4),worksheet!$A1:$B4,2,false)

<tbody>
</tbody>

The vlookup where it's seeking (worksheet!$A1:$B4) this looks like:
1
"Buy a "&INDIRECT(ADDRESS(ROW(),COLUMN()-1))&" from us"
2
"Everything we sell is great"
3
"The best warranty ever"
4
Best "&INDIRECT(ADDRESS(ROW(),COLUMN()-1))

<tbody>
</tbody>

In the cases of rows #1 and #4 I want to return "refrigerator" for the INDIRECT formula. As written it will return "1" and "4" respectively since it runs relative to its local position. How can I run it local to the vlookup?
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
Maybe something like this


A
B
C
D
E
1
1​
Buy a # from us​
Refrigerator​
Buy a Refrigerator from us​
2
2​
Everything we sell is great​
Car​
Best Car from us​
3
3​
The best warranty ever​
4
4​
Best # from us​

<tbody>
</tbody>


Formula in E1 copied down
=SUBSTITUTE(VLOOKUP(RANDBETWEEN(1,4),A:B,2,0),"#",D1)

M.
 
Upvote 0

Forum statistics

Threads
1,215,016
Messages
6,122,700
Members
449,092
Latest member
snoom82

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