+ Reply to Thread
Results 1 to 3 of 3

find last row with data

  1. #1
    Registered User
    Join Date
    08-17-2005
    Posts
    27

    Read bottom row of Data

    I have an excel file that is looking at another file to get an array of info.Currently it is going to the first blank row then looking up one row and retrieving that info.I have pasted below the function as it is currently written .Can someone show me an editing of this that will tell it to simply read the bottom row of data. Thanks-Greg



    Function FindBlankRow()
    x = 2
    Do While ActiveSheet.Cells(x, 1) <> ""
    x = x + 1
    Loop
    FindBlankRow = x - 1
    Last edited by singlgl1; 11-25-2005 at 03:25 PM. Reason: clarifying

  2. #2
    Dave Peterson
    Guest

    Re: find last row with data

    dim LastCell as range
    with workbooks("someworkbook").worksheets("Someworksheet")
    set lastcell = .cells(.rows.count,"A").end(xlup)
    end with

    msgbox lastcell.value & "--" & lastcell.address(0,0) & "--" & lastcell.row

    I got the lastcell from column A.

    singlgl1 wrote:
    >
    > I have an excel file that is looking at another file to get an array of
    > info.Currently it is going to the first blank row then looking up one
    > row and retrieving that info.I have pasted below the function as it is
    > currently written .Can someone show me an editing of this that will
    > tell it to simply read the bottom row with data. Thankss-Greg
    >
    > Function FindBlankRow()
    > x = 2
    > Do While ActiveSheet.Cells(x, 1) <> ""
    > x = x + 1
    > Loop
    > FindBlankRow = x - 1
    >
    > --
    > singlgl1
    > ------------------------------------------------------------------------
    > singlgl1's Profile: http://www.excelforum.com/member.php...o&userid=26389
    > View this thread: http://www.excelforum.com/showthread...hreadid=488238


    --

    Dave Peterson

  3. #3
    Registered User
    Join Date
    08-17-2005
    Posts
    27
    Thanks for the input.

+ 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