ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Use a variable for a worksheet name? (https://www.excelbanter.com/excel-programming/309280-re-use-variable-worksheet-name.html)

Frank Kabel

Use a variable for a worksheet name?
 
Hi
if you have placed the number in cell A1 try:
=INDIRECT("'sheet (" & A1 & ")'!B1")


--
Regards
Frank Kabel
Frankfurt, Germany


Jim Cottrell wrote:
Can I use a variable to access a specific worksheet?
My worksheets are named 'Sheet (1)','Sheet (2)' . . .
Can I constuct a formula in a cell such as "='Sheet (X)'!Price" so
that if X=3 I can return the value from 'Sheet (3)'!Price ??
Thanks!



All times are GMT +1. The time now is 07:39 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com