View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bernie Deitrick Bernie Deitrick is offline
external usenet poster
 
Posts: 5,441
Default "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