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

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
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,216,460
Messages
6,130,771
Members
449,589
Latest member
Hana2911

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