Consulting

Results 1 to 1 of 1

Thread: How to loop copy & paste

  1. #1

    How to loop copy & paste

    Hi,

    I am a newbie in macro. I tried recording a macro doing copy and paste. There are around 5847 values from Sheet1 to be copied to Sheet2. The recorded macro looks like this:

    Sheets("Sheet1").Select
    Range("A2").Select
    Selection.Copy
    Sheets("Sheet2").Select
    Range("A2:A228").Select
    Selection.PasteSpecial paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:= _
    False, Transpose:=False
    Sheets("Sheet1").Select
    Range("B1:HT1").Select
    Selection.Copy
    Sheets("Sheet2").Select
    Range("B2:B228").Select
    Selection.PasteSpecial paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:= _
    False, Transpose:=True

    I want to repeat the process but recording it will be too tedious. I hope I can loop the process but I don't know how. Can anybody help me please? I have attached the file.
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •