View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
mepetey mepetey is offline
external usenet poster
 
Posts: 19
Default import data after last line of data

Perfect.!

Thanks TrevoseF



wrote in message
oups.com...
On Oct 24, 6:31 am, eliano wrote:
Hi mepetey.
Try:

R = ActiveSheet.UsedRange.Rows.Count 'last row
C = ActiveSheet.UsedRange.Columns.Count 'last column

Regards
Eliano



"mepetey" wrote:
I need to be able to import data from one worksheet to another. I am
ok
with the macro to select and copy the new data from the source sheet,
but I
need to be able to identify the last "occupied" row in the target
sheet, so
as not to overwrite. Is there a simple way to do this? any help
greatly
appreciated.- Hide quoted text -


- Show quoted text -


Hi,

Try this. Change the cell reference in Range("A1") to refer to your
desired location.
Range("A1").Select
Do
If IsEmpty(ActiveCell) = False Then
ActiveCell.Offset(1, 0).Select
End If
Loop Until IsEmpty(ActiveCell) = True
ActiveCell.Value = "New"

Regards
TrevoseF