#1   Report Post  
Posted to microsoft.public.excel.programming
VDM VDM is offline
external usenet poster
 
Posts: 2
Default 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


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default 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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,337
Default 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




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 05:10 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"