using the name of a worksheet written in a cell, inside a formula

  • Thread starter Using the name of a worksheet written in
  • Start date
U

Using the name of a worksheet written in

How can I use the name of a worksheet written in a cell, inside a formula
(VLOOKUP/HLOOKUP). Ex. Cell A1 = BalanceSheet1
=HLOOKUP('General Fund'!G$1,Sheet1!$B$4:$CM$4,1,FALSE)

How to replace Sheet1 with the contents of Cell A1
 
M

Max

One way is to use INDIRECT,

something like this in say, B1:
=HLOOKUP('General Fund'!G$1,INDIRECT("'" & A1 & "'!B4:CM4"),1,FALSE)

where A1 contains the text: Sheet1
(had assumed the contents of A1 indicated in your post was a typo)
 
G

Gary''s Student

Use INDIRECT()

in place of Sheet1!$B$4:$CM$4
use INDIRECT(A1 & "$B$4:$CM$4")
 
Top