+ Reply to Thread
Results 1 to 2 of 2

last record

  1. #1
    Registered User
    Join Date
    09-21-2006
    Posts
    32

    last record

    Hello everyone,
    i need help
    i have table and when i start macro, i need, that it find last emty row in table and fill data in it.

    NAME AGE ***
    JOHN 18 MALE
    LUKE 20 MALE

    fill data after LUKE and etc...

  2. #2
    Valued Forum Contributor mudraker's Avatar
    Join Date
    11-10-2003
    Location
    Melbourne, Australia
    Posts
    3,983
    Here are a codes to assit you

    They all find the last used row - you will need to add 1 to result to get the vacant row number

    find last used row in column A before a vacant cell - this will not be the very last used row in column A if you have vacant cells foloowed by more data.
    LastRow = Range("A1").End(xlDown).Row

    This finds the last used cell in Column A
    LastRow = Cells(Rows.Count, "a").End(xlUp).Row

    This finds the last used row regardless of which column it is in.
    GetBottomRow = TheSheet.Cells.Find(what:="*", searchorder:=xlByRows, _
    searchdirection:=xlPrevious).Row


    This finds the last used column regardless of which rowit is in.
    LastColumn = TheSheet.Cells.Find(what:="*", searchorder:=xlByColumns, _
    searchdirection:=xlPrevious).Column

+ 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