View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
mark kubicki mark kubicki is offline
external usenet poster
 
Posts: 32
Default finding last cell of data

any suggestions about why this is not working;
....it always finds the last fellof data on th e sheet as "A1" (it is not)

'determine last row of data
Set foundcell = Cells.Find("*", Range("A1"), xlValues, xlPart, xlByRows,
xlPrevious)
If foundcell Is Nothing = 0 Then
lDataRow = 1
lDataCell = Range("A1").Address
Else
lDataRow = foundcell.Row
lDataCell = foundcell
End If


thanks in advance,
mark