Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 76
Default Macro - Next blank row

I have A summary Sheet, and a few tabs, and i want a macro to collate
all this information.
So far i have;

--------------------------
Dim rng As Range

Set rng = Sheets("Summary
Sheet").Range("A65536").End(xlUp).Offset(1, 0)

Sheets("SME Quarterly").Select
Rows("15:43").Select
Selection.Copy Destination:=rng
Application.CutCopyMode = False

Sheets("Sheet1").Select
Rows("15:43").Select
Selection.Copy Destination:=rng
Application.CutCopyMode = False

Sheets("Sheet2").Select
Rows("15:43").Select
Selection.Copy Destination:=rng
Application.CutCopyMode = False

Sheets("Sheet3").Select
Rows("15:43").Select
Selection.Copy Destination:=rng
Application.CutCopyMode = False
End Sub
--------------------------

All it seems to do is paste over the top of each entry.
Thanks if you can help.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default Macro - Next blank row

Maybe this way.

Note sheets aren't selected, for this operation there' no need

Sub copy()
Sheets("SME Quarterly").Rows("15:43").copy
lastrow = Sheets("Summary Sheet").Cells(Rows.Count, "A").End(xlUp).Row
Sheets("Summary Sheet").Range("A" & lastrow + 1).PasteSpecial
Application.CutCopyMode = False

Sheets("Sheet1").Rows("15:43").copy
lastrow = Sheets("Summary Sheet").Cells(Rows.Count, "A").End(xlUp).Row
Sheets("Summary Sheet").Range("A" & lastrow + 1).PasteSpecial
Application.CutCopyMode = False

Sheets("Sheet2").Rows("15:43").copy
lastrow = Sheets("Summary Sheet").Cells(Rows.Count, "A").End(xlUp).Row
Sheets("Summary Sheet").Range("A" & lastrow + 1).PasteSpecial
Application.CutCopyMode = False

Sheets("Sheet3").Rows("15:43").copy
lastrow = Sheets("Summary Sheet").Cells(Rows.Count, "A").End(xlUp).Row
Sheets("Summary Sheet").Range("A" & lastrow + 1).PasteSpecial
Application.CutCopyMode = False
End Sub

Mike

"NPell" wrote:

I have A summary Sheet, and a few tabs, and i want a macro to collate
all this information.
So far i have;

--------------------------
Dim rng As Range

Set rng = Sheets("Summary
Sheet").Range("A65536").End(xlUp).Offset(1, 0)

Sheets("SME Quarterly").Select
Rows("15:43").Select
Selection.Copy Destination:=rng
Application.CutCopyMode = False

Sheets("Sheet1").Select
Rows("15:43").Select
Selection.Copy Destination:=rng
Application.CutCopyMode = False

Sheets("Sheet2").Select
Rows("15:43").Select
Selection.Copy Destination:=rng
Application.CutCopyMode = False

Sheets("Sheet3").Select
Rows("15:43").Select
Selection.Copy Destination:=rng
Application.CutCopyMode = False
End Sub
--------------------------

All it seems to do is paste over the top of each entry.
Thanks if you can help.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 76
Default Macro - Next blank row

On 22 Aug, 15:35, Mike H wrote:
Maybe this way.

Note sheets aren't selected, for this operation there' no need

Sub copy()
* * Sheets("SME Quarterly").Rows("15:43").copy
* * lastrow = Sheets("Summary Sheet").Cells(Rows.Count, "A").End(xlUp).Row
* * Sheets("Summary Sheet").Range("A" & lastrow + 1).PasteSpecial
* * Application.CutCopyMode = False

* * Sheets("Sheet1").Rows("15:43").copy
* * lastrow = Sheets("Summary Sheet").Cells(Rows.Count, "A").End(xlUp).Row
* * Sheets("Summary Sheet").Range("A" & lastrow + 1).PasteSpecial
* * Application.CutCopyMode = False

* * Sheets("Sheet2").Rows("15:43").copy
* * lastrow = Sheets("Summary Sheet").Cells(Rows.Count, "A").End(xlUp).Row
* * Sheets("Summary Sheet").Range("A" & lastrow + 1).PasteSpecial
* * Application.CutCopyMode = False

* * Sheets("Sheet3").Rows("15:43").copy
* * lastrow = Sheets("Summary Sheet").Cells(Rows.Count, "A").End(xlUp).Row
* * Sheets("Summary Sheet").Range("A" & lastrow + 1).PasteSpecial
* * Application.CutCopyMode = False
End Sub

Mike



"NPell" wrote:
I have A summary Sheet, and a few tabs, and i want a macro to collate
all this information.
So far i have;


--------------------------
* * Dim rng As Range


* * Set rng = Sheets("Summary
Sheet").Range("A65536").End(xlUp).Offset(1, 0)


* * Sheets("SME Quarterly").Select
* * Rows("15:43").Select
* * Selection.Copy Destination:=rng
* * Application.CutCopyMode = False


* * Sheets("Sheet1").Select
* * Rows("15:43").Select
* * Selection.Copy Destination:=rng
* * Application.CutCopyMode = False


* * Sheets("Sheet2").Select
* * Rows("15:43").Select
* * Selection.Copy Destination:=rng
* * Application.CutCopyMode = False


* * Sheets("Sheet3").Select
* * Rows("15:43").Select
* * Selection.Copy Destination:=rng
* * Application.CutCopyMode = False
End Sub
--------------------------


All it seems to do is paste over the top of each entry.
Thanks if you can help.- Hide quoted text -


- Show quoted text -


Thanks Mike! It works!!
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default Macro - Next blank row

Excellent, Glad I could help

"NPell" wrote:

On 22 Aug, 15:35, Mike H wrote:
Maybe this way.

Note sheets aren't selected, for this operation there' no need

Sub copy()
Sheets("SME Quarterly").Rows("15:43").copy
lastrow = Sheets("Summary Sheet").Cells(Rows.Count, "A").End(xlUp).Row
Sheets("Summary Sheet").Range("A" & lastrow + 1).PasteSpecial
Application.CutCopyMode = False

Sheets("Sheet1").Rows("15:43").copy
lastrow = Sheets("Summary Sheet").Cells(Rows.Count, "A").End(xlUp).Row
Sheets("Summary Sheet").Range("A" & lastrow + 1).PasteSpecial
Application.CutCopyMode = False

Sheets("Sheet2").Rows("15:43").copy
lastrow = Sheets("Summary Sheet").Cells(Rows.Count, "A").End(xlUp).Row
Sheets("Summary Sheet").Range("A" & lastrow + 1).PasteSpecial
Application.CutCopyMode = False

Sheets("Sheet3").Rows("15:43").copy
lastrow = Sheets("Summary Sheet").Cells(Rows.Count, "A").End(xlUp).Row
Sheets("Summary Sheet").Range("A" & lastrow + 1).PasteSpecial
Application.CutCopyMode = False
End Sub

Mike



"NPell" wrote:
I have A summary Sheet, and a few tabs, and i want a macro to collate
all this information.
So far i have;


--------------------------
Dim rng As Range


Set rng = Sheets("Summary
Sheet").Range("A65536").End(xlUp).Offset(1, 0)


Sheets("SME Quarterly").Select
Rows("15:43").Select
Selection.Copy Destination:=rng
Application.CutCopyMode = False


Sheets("Sheet1").Select
Rows("15:43").Select
Selection.Copy Destination:=rng
Application.CutCopyMode = False


Sheets("Sheet2").Select
Rows("15:43").Select
Selection.Copy Destination:=rng
Application.CutCopyMode = False


Sheets("Sheet3").Select
Rows("15:43").Select
Selection.Copy Destination:=rng
Application.CutCopyMode = False
End Sub
--------------------------


All it seems to do is paste over the top of each entry.
Thanks if you can help.- Hide quoted text -


- Show quoted text -


Thanks Mike! It works!!

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
Macro to AddRow if Blank and Autosum simplymidori[_2_] Excel Discussion (Misc queries) 0 April 30th 08 12:01 AM
Macro not recognizing blank lines as blank pm Excel Discussion (Misc queries) 9 May 22nd 07 04:16 PM
Macro to hide the row if both columns E & F are blank in that row. PCakes Excel Worksheet Functions 2 January 4th 07 10:07 PM
Macro To Insert Blank Row? rtidrtid Excel Discussion (Misc queries) 1 February 3rd 06 03:00 PM
Using a Macro to paste into Blank Cells phillipsb Excel Worksheet Functions 0 October 5th 05 05:58 PM


All times are GMT +1. The time now is 12:50 PM.

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

About Us

"It's about Microsoft Excel"