Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Box666
 
Posts: n/a
Default Add a row to the bottom of a worksheet.

I have a macro that summaries data on sheet1, I then want it to append
this data in the form of a new row to the bottom of sheet2.

Is there a formula that I can use to locate the next blank row, or what
is the best way to achieve this please.

  #2   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson
 
Posts: n/a
Default Add a row to the bottom of a worksheet.

Maybe you could just copy and paste that row in your macro.

Option Explicit
sub testme()
dim DestCell as range
dim RngToCopy as range
'your code to get the summaries

'whatever row holds the
set rngtocopy = worksheets("sheet1").range("a999").entirerow

with worksheets("sheet2")
set destcell = .cells(.rows.count,"A").end(xlup).offset(1,0)
end with

rngtocopy.copy _
destination:=destcell

'or
rngtocopy.copy
destcell.pastespecial paste:=xlpastevalues

end sub

I used column A of sheet2 to find the next available row.



Box666 wrote:

I have a macro that summaries data on sheet1, I then want it to append
this data in the form of a new row to the bottom of sheet2.

Is there a formula that I can use to locate the next blank row, or what
is the best way to achieve this please.


--

Dave Peterson
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
VBA code to Add data to exsiting worksheet jonesaa05 Excel Discussion (Misc queries) 7 October 14th 05 01:20 PM
advanced: synchronizing data value across two worksheet drop boxes mdhokie Excel Worksheet Functions 1 October 6th 05 08:46 PM
Worksheet Function - Find? DAA Excel Worksheet Functions 2 February 24th 05 04:15 PM
empty rows at bottom of worksheet michael g Excel Discussion (Misc queries) 2 January 18th 05 09:17 PM
copyright and worksheet protection dow Excel Discussion (Misc queries) 2 January 3rd 05 03:07 PM


All times are GMT +1. The time now is 12:07 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"