ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Last Row (https://www.excelbanter.com/excel-programming/295311-last-row.html)

VDM

Last Row
 
How do I get to the next blank row on a spreadsheet.

For example,

Row 1 is empty
Rows 2-10 contain data
I want to add data to row 11

TIA



Frank Kabel

Last Row
 
Hi
try
Dim lastrow as long
Dim next_free_row as long
lastrow = ActiveSheet.Cells(Rows.count, "A").End(xlUp).row
next_free_row = lastrow+1


--
Regards
Frank Kabel
Frankfurt, Germany


VDM wrote:
How do I get to the next blank row on a spreadsheet.

For example,

Row 1 is empty
Rows 2-10 contain data
I want to add data to row 11

TIA


Don Guillett[_4_]

Last Row
 
assuming you want to find this in col A.
nextblankrow=cells(rows.count,1).end(xlup).row+1

--
Don Guillett
SalesAid Software

"VDM" wrote in message
...
How do I get to the next blank row on a spreadsheet.

For example,

Row 1 is empty
Rows 2-10 contain data
I want to add data to row 11

TIA






All times are GMT +1. The time now is 02:11 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com