Error Checking in Excel
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 5 of 5

Thread: The first cell from

  1. #1
    Board Regular
    Join Date
    Feb 2002
    Location
    Hengelo
    Posts
    79
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Hello All,

    I have data in column A, e.g. in cell A1, A10, A76, a189, Ax, ... .

    I want to know the first cell with data from the bottom up. So I don't want to start in A1 but in A1000.

    Is that possible in VB!?
    Best regards,

    Martin J.A. Maatman Oonk

  2. #2
    Board Regular
    Join Date
    Mar 2002
    Location
    =ActiveCell.Address
    Posts
    478
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Would something like this help...


    Lastrow = Range("A65000").End(xlUp).Row

    (Returns the row number of the last cell in column A with data in)

  3. #3
    MrExcel MVP
    Join Date
    Feb 2002
    Location
    Sunny, spring-like Hull
    Posts
    3,339
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Use something like: -

    For x = 1000 To 1 Step -1
    If Not IsEmpty(Cells(x, 1)) Then Exit For
    Next x

    MsgBox "Cell A" & x & " is the first cell with data in."


  4. #4
    MrExcel MVP
    Join Date
    Feb 2002
    Location
    Sunny, spring-like Hull
    Posts
    3,339
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    AJ's is better .

  5. #5
    Board Regular
    Join Date
    Feb 2002
    Location
    Hengelo
    Posts
    79
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    On 2002-03-06 05:28, AJ wrote:
    Would something like this help...


    Lastrow = Range("A65000").End(xlUp).Row

    (Returns the row number of the last cell in column A with data in)
    AJ thank U all tha way up!
    Best regards,

    Martin J.A. Maatman Oonk

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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