find last row with data

  • Thread starter Thread starter singlgl1
  • Start date Start date
S

singlgl1

I have an excel file that is looking at another file to get an array o
info.Currently it is going to the first blank row then looking up on
row and retrieving that info.I have pasted below the function as it i
currently written .Can someone show me an editing of this that wil
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 -
 
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.
 
Back
Top