+ Reply to Thread
Results 1 to 3 of 3

Getting a range from an array formula contained in a cell

  1. #1
    Registered User
    Join Date
    06-28-2005
    Posts
    81

    Getting a range from an array formula contained in a cell

    Hi to everyone.

    Thanks to the help of many I have written a macro that takes a range of cells (input range) and execute some code using the values contained in each cell. I have a cell (let's call it Sheet2!C1) which contain text and the text is the exact name of the input range (for example Sheet1!A1:A100). I process the text in the macro and set a range object to Sheet1!A1:A100 and then I use the newly created object. Now the problem is that whenever I change something in Sheet1 that changes the position of my input range (say that I add a collum to the left of collumn A) I must remember to change the text inside cell Sheet2!C1.

    So I would like to put inside Sheet2!C1 an array that references the input range ( I would do that writing = the selecting the range and then CTRL + ENTER for the array formula) This way the reference is updated if I make any change in Sheet1.

    So the question is: how do I create a range object making use of cell C1 that contains an array formula that actually is something like this {=Sheet1:A1:A100} ?

    Thanks in advance for your help

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678
    Create a named range that contains the data, and put the range name in Sheet2!C1. Then reference the range using INDIRECT(Sheet2!C1).

  3. #3
    Registered User
    Join Date
    06-28-2005
    Posts
    81
    isn't there a way without using a named range ?

+ 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