+ Reply to Thread
Results 1 to 8 of 8

dynamic range formula

  1. #1
    Forum Contributor
    Join Date
    06-18-2012
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    106

    dynamic range formula

    imagine this data in cells A1:F4

    A A F A
    A A F A
    2 A F A
    A A F A
    E A F A

    E A E F

    I am looking for a dynamic range formula that will include only those rows that have F in column C (I.E highlighted in red). The first set of cells in column C will always be F, how do I insure the range always ends where they stop?

    Thanks

  2. #2
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: dynamic range formula

    niceguy21,

    I'm a bit confused. A1:F4? Do you mean A1:D6? If that is what you meant (4 columns using 6 rows of data), then give this a try:
    Please Login or Register  to view this content.
    Note that this formula assumes the cells in column C will start with "F" and be a continuous block until they are no longer "F" and that there are no other occurrences of "F" after that.
    Hope that helps,
    ~tigeravatar

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Forum Contributor
    Join Date
    06-18-2012
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    106

    Re: dynamic range formula

    Quote Originally Posted by tigeravatar View Post
    niceguy21,

    I'm a bit confused. A1:F4? Do you mean A1:D6? If that is what you meant (4 columns using 6 rows of data), then give this a try:
    Please Login or Register  to view this content.
    Note that this formula assumes the cells in column C will start with "F" and be a continuous block until they are no longer "F" and that there are no other occurrences of "F" after that.
    What about if the cell range is D8:G13 ?? this isnt working in that instance
    Last edited by niceguy21; 11-02-2012 at 01:00 PM.

  4. #4
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: dynamic range formula

    Of course not, the formula is looking in columns A:D with they key column being C where is counts the occurrences of "F". You have to tell the formula what columns to look in and provide it with the key column. You should be able to adapt the provided formula.

  5. #5
    Forum Contributor
    Join Date
    09-25-2012
    Location
    Philadelphia, PA
    MS-Off Ver
    Excel 2010
    Posts
    151

    Re: dynamic range formula

    here is some code you can use / customize. The code identify the first row that does not have an F in column C.
    Please Login or Register  to view this content.

  6. #6
    Forum Contributor
    Join Date
    06-18-2012
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    106

    Re: dynamic range formula

    Quote Originally Posted by tigeravatar View Post
    of course not, the formula is looking in columns a:d with they key column being c where is counts the occurrences of "f". You have to tell the formula what columns to look in and provide it with the key column. You should be able to adapt the provided formula.
    =offset($d$8, 0, 0, countif($f:$f, "f"), 2)


    This isnt working..
    Last edited by niceguy21; 11-02-2012 at 01:00 PM.

  7. #7
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: dynamic range formula

    Looks like that offset formula should work just fine also. Great job!

  8. #8
    Forum Contributor
    Join Date
    06-18-2012
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    106

    Re: dynamic range formula

    Quote Originally Posted by tigeravatar View Post
    Looks like that offset formula should work just fine also. Great job!
    working now! just looked wierd when we referenced it in a cell.

+ 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