ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   "Indirect" reference to a cell in a code: how to do it? (https://www.excelbanter.com/excel-programming/340291-indirect-reference-cell-code-how-do.html)

bondcrash[_11_]

"Indirect" reference to a cell in a code: how to do it?
 

Hi all,

I am trying to build a line of code with the equivalent of the norma
INDIRECT function -for example INDIRECT("a1") - how can i do it?

Basically, whats the correct way to codify the INDIRECT of Range("a1"
in a line of code?


Many thanks

B

--
bondcras
-----------------------------------------------------------------------
bondcrash's Profile: http://www.excelforum.com/member.php...fo&userid=2099
View this thread: http://www.excelforum.com/showthread.php?threadid=46822


Bernie Deitrick

"Indirect" reference to a cell in a code: how to do it?
 
Range can take a string value, so it can be used the same as indirect, as long as the string is a
valid address of a cell or range of cells. So if you wanted the same as

=INDIRECT("a1")

then

=Range("A1").Value

or, if the text "A1" is in cell B1, for example

=Range(Range("B1").Value).Value

HTH,
Bernie
MS Excel MVP


"bondcrash" wrote in message
...

Hi all,

I am trying to build a line of code with the equivalent of the normal
INDIRECT function -for example INDIRECT("a1") - how can i do it?

Basically, whats the correct way to codify the INDIRECT of Range("a1")
in a line of code?


Many thanks

BC


--
bondcrash
------------------------------------------------------------------------
bondcrash's Profile: http://www.excelforum.com/member.php...o&userid=20997
View this thread: http://www.excelforum.com/showthread...hreadid=468226





All times are GMT +1. The time now is 03:46 AM.

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