My excel sheet looks like this
row 1 to row 150 have data and formating
row 151 to row 1600 have formating only
I need to find out the last row with DATA ONLY in Excel, however when I use the code below the count shows 1600 - all rows that have cell formating (backcolor etc) applied even if those cells have no data in them.
I also tried these with same problem:
VB Code:
ws.Cells.SpecialCells(xlCellTypeLastCell).row
xlApp.ActiveCell.SpecialCells(xlLastCell).Address(RowAbsolute:=False)
ws.UsedRange.Rows.Count
ActiveCell.SpecialCells(xlLastCell).row
How can I get the count of all the rows with data only.