PDA

View Full Version : Loop into Excel



ankit_ddit
03-10-2009, 05:47 AM
How to check that excel has end of data in worksheet using VB or C#

Bob Phillips
03-10-2009, 05:53 AM
LastRow = Cells(Rows.Count, "A").End(xlUp).Row

mikerickson
03-10-2009, 05:54 AM
MsgBox Range("A:A").Cells(Rows.Count,1).End(xlup).Address & _
" is the last cell with data in column A."

ankit_ddit
03-10-2009, 05:59 AM
what is rows here..

Bob Phillips
03-10-2009, 06:06 AM
Rows is an Excel object referring to the rows in a worksheet.

ankit_ddit
03-10-2009, 06:27 AM
u have idea how to check that row has data or not..

Bob Phillips
03-10-2009, 09:24 AM
If Application.COUNTA(Rows(1)) > 0 Then

...