Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Help for excel macro ( to append records)

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

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default 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
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


Similar Threads
Thread Thread Starter Forum Replies Last Post
how do i append records to an excel spreadsheet mercedesb_girl Excel Discussion (Misc queries) 2 August 29th 08 05:45 PM
Copy and Append Macro Excel Help! Excel Discussion (Misc queries) 2 April 7th 08 05:39 PM
Macro that will Cut rows and then insert-copy or append rod Excel Discussion (Misc queries) 3 October 21st 06 04:50 PM
How do I create an excel macro to append to a cell with existing i zola_tiara Excel Discussion (Misc queries) 4 September 14th 05 08:22 PM
Hotkey problem w/ macro to append comment roadkill Excel Discussion (Misc queries) 1 April 6th 05 06:52 PM


All times are GMT +1. The time now is 10:48 PM.

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

About Us

"It's about Microsoft Excel"