How to check that excel has end of data in worksheet using VB or C#
How to check that excel has end of data in worksheet using VB or C#
[vba]
LastRow = Cells(Rows.Count, "A").End(xlUp).Row
[/vba]
____________________________________________
Nihil simul inventum est et perfectum
Abusus non tollit usum
Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
James Thurber
[VBA]MsgBox Range("A:A").Cells(Rows.Count,1).End(xlup).Address & _
" is the last cell with data in column A."
[/VBA]
what is rows here..
Rows is an Excel object referring to the rows in a worksheet.
____________________________________________
Nihil simul inventum est et perfectum
Abusus non tollit usum
Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
James Thurber
u have idea how to check that row has data or not..
[vba]
If Application.COUNTA(Rows(1)) > 0 Then
...
[/vba]
____________________________________________
Nihil simul inventum est et perfectum
Abusus non tollit usum
Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
James Thurber