Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
tim
 
Posts: n/a
Default Looking for another way


I am trying to find a solution for an earlier post. Is there a way for a
macro to copy only the selected cells on multiple sheets and paste onto
a sheet. I want to copy let's say A1:A7 - B1:B7 from about four sheets.
I will have already made the selection I just want the macro to copy the
selections from the four different sheet and patse it on a fifth sheet.


--
tim
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
R.VENKATARAMAN
 
Posts: n/a
Default Looking for another way

try this sub and see whether you get what you want
may benot elegant.

Public Sub test()
Dim dest As Range
Dim shcount As Worksheet
Set shcount = Worksheets(Sheets.Count)
Dim n As Integer
n = Sheets.Count - 1
Dim i As Integer
For i = 1 To n
Worksheets("sheet" & i).Activate
Set dest = shcount.Cells(65536, 1).End(xlUp).Offset(1, 0)
Range(Range("a1"), Range("B77")).Copy Destination:=dest
Next i
shcount.Rows("1:1").Delete
shcount.Activate
End Sub


"tim" wrote in message
...

I am trying to find a solution for an earlier post. Is there a way for a
macro to copy only the selected cells on multiple sheets and paste onto
a sheet. I want to copy let's say A1:A7 - B1:B7 from about four sheets.
I will have already made the selection I just want the macro to copy the
selections from the four different sheet and patse it on a fifth sheet.


--
tim



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



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