ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   How to use a cell value as operator in a worksheet reference? (https://www.excelbanter.com/excel-worksheet-functions/104887-how-use-cell-value-operator-worksheet-reference.html)

JRP2003

How to use a cell value as operator in a worksheet reference?
 
I would like to use the value of a cell, in this case a stock ticker, to
refer to another worksheet that is named identically. For instance, I have a
cell value UPS and a worksheet named 'UPS', I would like to pull a value, say
D21, out of UPS! without hard-coding UPS! into my formula.

I'd eventually like it to reference a column of different tickers and pull
out of an equal number of different worksheets, all named the values of the
tickers. I think it should be a simple syntax thing, something like
='value(B1)'!D$21$, if my reference is in cell B1. Is this possible?

David Billigmeier

How to use a cell value as operator in a worksheet reference?
 
Use the INDIRECT() function, like so:

=INDIRECT(B1&"!D21")

--
Regards,
Dave


"JRP2003" wrote:

I would like to use the value of a cell, in this case a stock ticker, to
refer to another worksheet that is named identically. For instance, I have a
cell value UPS and a worksheet named 'UPS', I would like to pull a value, say
D21, out of UPS! without hard-coding UPS! into my formula.

I'd eventually like it to reference a column of different tickers and pull
out of an equal number of different worksheets, all named the values of the
tickers. I think it should be a simple syntax thing, something like
='value(B1)'!D$21$, if my reference is in cell B1. Is this possible?


JRP2003

How to use a cell value as operator in a worksheet reference?
 
Thank you. You provided both the command and the syntax and my question will
be answered evermore. I had been eyeing the intirect() command but knew
little about it and less about its correct use.

Thanks again!


All times are GMT +1. The time now is 02:55 PM.

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