Consulting

Results 1 to 4 of 4

Thread: Solved: named ranges

  1. #1
    VBAX Tutor
    Joined
    Mar 2009
    Posts
    227
    Location

    Solved: named ranges

    Hi,

    Just a general query regarding named dynamic ranges.

    In a sheet when there are several columns, and we are naming each column separately, is there any difference between the following formula?

    =(Sheet1!$C$2:INDEX(Sheet1!$C:$C,COUNTA(Sheet1!$A:$A))

    and

    =(Sheet1!$C$2:INDEX(Sheet1!$C:$C,COUNTA(Sheet1!$C:$C))


    assuming there are no empty cells


    thanks

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    It depends upon what is in column A and what is in column C. If they are always 1-for-1, then no.
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  3. #3
    VBAX Regular arkusM's Avatar
    Joined
    May 2007
    Location
    Calgary
    Posts
    52
    Location
    Quote Originally Posted by Anomandaris
    Hi,

    Just a general query regarding named dynamic ranges.
    In a sheet when there are several columns, and we are naming each column separately, is there any difference between the following formula?
    =(Sheet1!$C$2:INDEX(Sheet1!$C:$C,COUNTA(Sheet1!$A:$A))
    and
    =(Sheet1!$C$2:INDEX(Sheet1!$C:$C,COUNTA(Sheet1!$C:$C))
    assuming there are no empty cells
    thanks
    If you are using the named ranges in an array formula I would suggest that you use a column that will always represent the most amount of rows to set the bottom of the range. If you don't if there are blank rows you named ranges will be different lengths and cause an error. I discovered the grief of differeing range lengths the hard way, as I used to use named range function like this a lot.
    Excel 2003, WinXP

  4. #4
    VBAX Tutor
    Joined
    Mar 2009
    Posts
    227
    Location
    Thanks for the info guys, that answers my question...

Posting Permissions

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