vba question (specific row in a range)

Discussion in 'OT Technology' started by GuOD, Feb 20, 2008.

  1. GuOD

    GuOD mcflurry diet

    Joined:
    May 19, 2003
    Messages:
    7,366
    Likes Received:
    0
    Location:
    Toronto
    I have two excel VBA questions... one general and one more specific

    1. Let's say I have a Range A1:C6 named "Stuff"
    Do I refer to specific parts of the range using the offset command? (just wondering what the standard is)

    2. Imagine the range is still A1:C6 but I have data in rows 1 and 2. Let's say I want to find the last used row in the range.. I'm guessing the command would be as follows. Would this show 2(last used row) or 6(last row in range)

    Range("stuff").End(xlup).Row

    ... if the above shows 2, how do I find the last row in the defined range?

    Thanks!
     
  2. GuOD

    GuOD mcflurry diet

    Joined:
    May 19, 2003
    Messages:
    7,366
    Likes Received:
    0
    Location:
    Toronto
    I'd like to update/change my question.

    Let's say I have a range "TEST" (A1:C6) ... how do I find the LAST cell in column A of this range? (in case rows are inserted above, I want the row value of last cell in the range in column A)



    Thanks!
     
    Last edited: Feb 20, 2008

Share This Page