Next Row

N

Neil

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?
 
D

Duke Carey

'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
 
D

Don Guillett

try
nextavailrow=cells(activecell.row,activecell.column).end(xldown).row+1
or this might be better
lastrow=cells(rows.count,activecell.column).end(xlup).row+1
 
Top