+ Reply to Thread
Results 1 to 2 of 2

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

  1. #1
    Registered User
    Join Date
    03-11-2005
    Posts
    87

    "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 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

  2. #2
    Bernie Deitrick
    Guest

    Re: "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" <[email protected]> wrote in message
    news:[email protected]...
    >
    > 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
    >




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1