#1   Report Post  
Neil
 
Posts: n/a
Default Next Row

I'm trying to find the code which automatically finds the next available row
in excel in order to paste some data from the clipboard. Please could you
help?
  #2   Report Post  
Duke Carey
 
Posts: n/a
Default

'next available row' can be interpreted/defined in various ways. What
criteria would *you* use to determine availablity?

If it's the cell below the last filled cell in column A

dim rng as range
set rng = cells(65536,1).End(xlup).offset(1.0).entirerow


"Neil" wrote:

I'm trying to find the code which automatically finds the next available row
in excel in order to paste some data from the clipboard. Please could you
help?

  #3   Report Post  
Don Guillett
 
Posts: n/a
Default

try
nextavailrow=cells(activecell.row,activecell.colum n).end(xldown).row+1
or this might be better
lastrow=cells(rows.count,activecell.column).end(xl up).row+1
--
Don Guillett
SalesAid Software

"Neil" wrote in message
...
I'm trying to find the code which automatically finds the next available

row
in excel in order to paste some data from the clipboard. Please could you
help?



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 01:01 PM.

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

About Us

"It's about Microsoft Excel"