+ Reply to Thread
Results 1 to 6 of 6

Create Macro To Copy Moving Range of Rows

Hybrid View

  1. #1
    Registered User
    Join Date
    09-26-2007
    Posts
    6
    One last thing. Is it possible for you to add the code that lets you paste the data as values? Currently I have formulas in the data I am copying and I want to make the duplicate data values only.

    Any help would be appreciated.

    Thanks!

  2. #2
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591
    Hi

    Here goes

    Sub aaa()
      
      Dim SrcSH As Worksheet
      Dim OutSH As Worksheet
      Set SrcSH = ActiveSheet
      Sheets.Add after:=Sheets(Sheets.Count)
      Set OutSH = ActiveSheet
      
      SrcSH.Select
      Rows("10:" & Cells(Rows.Count, 1).End(xlUp).Row).EntireRow.Copy
      OutSH.Cells(Rows.Count, 1).End(xlUp).PasteSpecial (xlPasteValues)
      Rows("10:" & Cells(Rows.Count, 1).End(xlUp).Row).EntireRow.Copy
      Cells(Rows.Count, 1).End(xlUp).Offset(3, 0).PasteSpecial (xlPasteValues)
      Application.CutCopyMode = False
      
      
    End Sub
    rylo

  3. #3
    Registered User
    Join Date
    09-26-2007
    Posts
    6
    Rylo,

    Thanks again . I can't thank you enough as I would have spent days trying to think of another solution that would not be even close to this. This is exactly what I needed to complete my project.

    Just picked myself up one of those beginner Excel VBA Programming books to start getting a feel for doing some of these things on my own.

    B

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1