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
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(quot;sheetquot; amp; i).Activate
Set dest = shcount.Cells(65536, 1).End(xlUp).Offset(1, 0)
Range(Range(quot;a1quot;), Range(quot;B77quot;)).Copy Destination:=dest
Next i
shcount.Rows(quot;1:1quot;).Delete
shcount.Activate
End Subquot;timquot; gt; wrote in message
...
gt;
gt; I am trying to find a solution for an earlier post. Is there a way for a
gt; macro to copy only the selected cells on multiple sheets and paste onto
gt; a sheet. I want to copy let's say A1:A7 - B1:B7 from about four sheets.
gt; I will have already made the selection I just want the macro to copy the
gt; selections from the four different sheet and patse it on a fifth sheet.
gt;
gt;
gt; --
gt; tim
- Apr 21 Sat 2007 20:36
Looking for another way
close
全站熱搜
留言列表
發表留言