Help for excel macro ( to append records)

S

Sunil Somani

Dear All,

Please suggest me the sample code or steps to append records at the end in a
excel sheet in same workbook.

Background: I am writing a macro, IN my work book there are two work sheets.
One is daily ( Populated with daily data and erase yesterdays data)
One is Monthly ( Motive is to keep daily data for Monthly calculations)

Now task is to copy data/records from daily sheet to Monthly sheet today and
then append everyday data from daily sheet to monthly sheet.

I am facing issue in appending the data.

Kindly advise, either with sample code or steps.

Thanks in advance,

Best regards,
Sunil Somani
(e-mail address removed)
 
G

Gord Dibben

Adjust this to suit.

Sub findbottom_paste()
Dim rng1 As Range
Dim rng2 As Range
Set rng1 = Worksheets("Sheet1").Cells(Rows.Count, 1).End(xlUp) _
.entirerow
Set rng2 = Worksheets("Sheet2").Cells(Rows.Count, 1).End(xlUp) _
..Offset(1, 0)
rng1.Copy Destination:=rng2
End Sub


Gord Dibben MS Excel MVP

On Tue, 29 Sep 2009 09:21:01 -0700, Sunil Somani <Sunil
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top