+ Reply to Thread
Results 1 to 4 of 4

Dynamic Range Across Columns/Along a Row

  1. #1
    Forum Contributor
    Join Date
    04-11-2008
    Posts
    156

    Dynamic Range Across Columns/Along a Row

    Hi,

    Please can you you show me how to write an OFFSET function that creates a dynamic range across columns/along a row rather than down a column/across rows.

    For instance, how do I create a dynamic range that starts in c7 and expands along row 7 and stops short of the row Grand Total in the final column of the row ie I do not want the Grand Total to be included in the range.

    Thank you for your help.

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Dynamic Range Across Columns/Along a Row

    You don't specify how we identify the Grand Total column ?

    Range:
    =$C7:INDEX($7:$7,MATCH("Grand Total",$6:$6,0)-1)

    would create a range from C7 to ?7 where ? is determined by column preceding that containing text in Grand Total in row above.

    More info I suspect is required...

    Incidentally try to avoid OFFSET when you can as it is Volatile (see link in sig for more info)

  3. #3
    Forum Contributor
    Join Date
    04-11-2008
    Posts
    156

    Re: Dynamic Range Across Columns/Along a Row

    Hi,

    Thank you for your reply. I'm not sure I understand how to apply your formula though...

    The Grand total column has a column heading in row 4. Does this mean I need to adapt your formula as follows:

    =$C7:INDEX($7:$7,MATCH("Grand Total",$6:$6,0)-1)

    Thank you

  4. #4
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Dynamic Range Across Columns/Along a Row

    To create the range based on header in row 4:

    =$C7:INDEX($7:$7,MATCH("Grand Total",$4:$4,0)-1)

    I wasn't sure if you were looking to create a Dynamic Named Range or just looking to create it and work with it... ie to SUM the range:

    =SUM($C7:INDEX($7:$7,MATCH("Grand Total",$4:$4,0)-1))

+ 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