+ Reply to Thread
Results 1 to 4 of 4

Dynamically set a range?

  1. #1
    Registered User
    Join Date
    04-26-2006
    Posts
    7

    Dynamically set a range?

    Is there a way to dynamically set a range? For instance... can I have a formula that includes a range (Ax:Ay) where I can set the values of x and y based on the value of another cell so that in one case, the range may be A1:A80 and in another it may be A50:A60 and so on?

    Thanks.

  2. #2
    Richard Buttrey
    Guest

    Re: Dynamically set a range?

    On Thu, 27 Apr 2006 08:17:57 -0500, BKGT
    <[email protected]> wrote:

    >
    >Is there a way to dynamically set a range? For instance... can I have a
    >formula that includes a range (Ax:Ay) where I can set the values of x
    >and y based on the value of another cell so that in one case, the range
    >may be A1:A80 and in another it may be A50:A60 and so on?
    >
    >Thanks.


    Use the Indirect Function

    If your x & y variable cells are say B1 & B2

    then with B1=50 and B2=60 and if (say) you're summing A50:A60, your
    formula would be

    =SUM(INDIRECT("A"&B1&":A"&B2))

    HTH


    __
    Richard Buttrey
    Grappenhall, Cheshire, UK
    __________________________

  3. #3
    Arvi Laanemets
    Guest

    Re: Dynamically set a range?

    Hi

    Like this:

    =SUM(INDIRECT(A1))
    , where A1 contains string like "A1:A80"


    --
    Arvi Laanemets
    ( My real mail address: arvi.laanemets<at>tarkon.ee )



    "BKGT" <[email protected]> wrote in message
    news:[email protected]...
    >
    > Is there a way to dynamically set a range? For instance... can I have a
    > formula that includes a range (Ax:Ay) where I can set the values of x
    > and y based on the value of another cell so that in one case, the range
    > may be A1:A80 and in another it may be A50:A60 and so on?
    >
    > Thanks.
    >
    >
    > --
    > BKGT
    > ------------------------------------------------------------------------
    > BKGT's Profile:
    > http://www.excelforum.com/member.php...o&userid=33862
    > View this thread: http://www.excelforum.com/showthread...hreadid=536778
    >




  4. #4
    Registered User
    Join Date
    04-26-2006
    Posts
    7
    Great. That worked for me.

    Thanks for the help and the quick responses.

+ 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