VLOOKUP with variable sheet name

raikks

New Member
Joined
Feb 23, 2020
Messages
41
Office Version
  1. 2019
Platform
  1. Windows
Book1
AB
1Mike54
2
3Sheet2
Sheet1
Cell Formulas
RangeFormula
B1B1=VLOOKUP(A1,Sheet2!$A$1:$B$5,2,0)

Book1
AB
1Alex91
2Adriana40
3John84
4Diana25
5Mike54
Sheet2

Book1
AB
1James79
2Robert76
3Patricia94
4Mary18
5Thomas91
Sheet3


I have and Excel file with 3 spreadsheets.
In Sheet1, in VLOOKUP formula (cell B1), instead of modifying the name of the sheet into the formula, is it possible to link cell A3 with cell B1?
So instead of { =VLOOKUP(A1,Sheet2!$A$1:$B$5,2,0) } to have something like { =VLOOKUP(A1,A3!$A$1:$B$5,2,0) } ?
I would basically like to input data only in cells A1 and A3 and cell B1 to update automatically.
I'm not sure if I made myself clear...
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.

maabadi

Well-known Member
Joined
Oct 22, 2012
Messages
2,675
Office Version
  1. 2019
  2. 2016
Platform
  1. Windows
Try this:
Excel Formula:
=VLOOKUP(A1,INDIRECT("'"&$A$3&"'!"&"$A$1:$B$5"),2,0)
 
Solution

raikks

New Member
Joined
Feb 23, 2020
Messages
41
Office Version
  1. 2019
Platform
  1. Windows
I can't stop smiling - it works perfect.
Thank you!
 

maabadi

Well-known Member
Joined
Oct 22, 2012
Messages
2,675
Office Version
  1. 2019
  2. 2016
Platform
  1. Windows
You're Welcome & Thanks for follow-up.
 

Forum statistics

Threads
1,147,451
Messages
5,741,197
Members
423,648
Latest member
steel1968

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
Top