LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,836
Default Copy/Paste Macro; Loop is Misbehaving

Im trying to come up with a macro that takes names in a list, Range is
AA1:AA11, copy paste each name into both Range A3:A6 and Range A11:A14.
Several links, all using GetPivotTable functions, will update with the name
in those ranges. Then I want to copy/paste the Range A1:O17 to a new Sheet
and loop to the next name. Im sure it is possible. I am not sure of how to
do it. Can someone please assist?

I think it is going to look something like this:
Sub Macro1()

For Each c In Sheets("Report").Range("A1:A11")
lstRw = Cells(Rows.Count, 27).End(xlUp).Row

ActiveCell.Select
Selection.Copy


Range("A3:A6,A11:A14").Select
Range("A11").Activate
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Range("A1:O17").Select
Application.CutCopyMode = False
Selection.Copy
Sheets.Add
ActiveSheet.Paste
Selection.Columns.AutoFit
Range("A1").Select

Next c
End Sub

It keeps copying/pasting the value in A1, in Sheet "Report" to
Range("A3:A6,A11:A14").Select.


Regards,
Ryan---


--
RyGuy
 
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
copy-paste started misbehaving (cell reference wrong) [email protected] Excel Discussion (Misc queries) 1 April 17th 07 07:09 AM
copy paste loop---new to vba MFR Excel Programming 4 October 26th 06 08:25 PM
Copy and Paste Loop japorms[_17_] Excel Programming 2 July 19th 06 09:07 PM
Copy/Paste Loop Jelly''s Excel Programming 0 December 6th 05 10:10 PM
copy and paste loop Dillonstar[_5_] Excel Programming 1 December 11th 03 04:22 PM


All times are GMT +1. The time now is 04:06 AM.

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"