How to use "last row" logic in VBA ?
for i = 1 to lastrow lastrow = range("C:C").values.End(xlup).rows
How to delete the blank rows where I have some values in the rows?
Asked
Active
Viewed 503 times
2

Community
- 1
- 1

user3044479
- 21
- 1
-
Regd your second point. How is it a `Blank` row if you have values in it? – Siddharth Rout Nov 29 '13 at 10:24
-
To find lastrow you may want to see [THIS](http://stackoverflow.com/questions/11169445/error-finding-last-used-cell-in-vba) – Siddharth Rout Nov 29 '13 at 10:25
-
And here is the fastest way to delete [Blank Rows](http://stackoverflow.com/questions/10705724/how-can-i-use-vba-to-delete-all-columns-which-are-empty-apart-from-a-specific-he/10706434#10706434) – Siddharth Rout Nov 29 '13 at 10:28
-
Yet [ANOTHER](http://stackoverflow.com/questions/19195515/trying-to-delete-a-row-if-no-data-in-row-aj) way which will not delete the rows inside the loop. – Siddharth Rout Nov 29 '13 at 10:33
1 Answers
0
lastrow= cells (activesheet.rows.count, "A" ). End (xlup). Row
"A" can be replaced by 1 without quotes and is the column from wich you want the lastrow.

Patrick Lepelletier
- 1,596
- 2
- 17
- 24