Thread
:
Help for excel macro ( to append records)
View Single Post
#
2
Posted to microsoft.public.excel.misc
Gord Dibben
external usenet poster
Posts: 22,906
Help for excel macro ( to append records)
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
wrote:
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
Reply With Quote
Gord Dibben
View Public Profile
Find all posts by Gord Dibben