Consulting

Results 1 to 3 of 3

Thread: Last non-blank cell in a row or column

  1. #1
    VBAX Regular
    Joined
    Mar 2009
    Posts
    6
    Location

    Last non-blank cell in a row or column

    Hi,

    I am using following command to find a last non-blank cell in a row:
    [vba]Range("A1").End(xlToRight).Select [/vba]It works fine most of the time. But sometimes, the result is unexpected.
    For instance, when I delete the values in the row, it gets confused.

    Anyone has a better solution for fiding the last non-blank cell?

    Thanks,

    Arash

  2. #2
    try

    cells(1,columns.Count).end(xltoleft).select

  3. #3
    VBAX Regular
    Joined
    Mar 2009
    Posts
    6
    Location
    Thanks venkat.

    Cheers.

Posting Permissions

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