Results 1 to 2 of 2

Thread: PASTING FROM ONE WORKSHEET TO ANOTHER INTO NEXT FREE ROW

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #2
    Member rollis13's Avatar
    Join Date
    Nov 2012
    Posts
    36
    Rep Power
    0
    Found this in my notes. As it is the macro, when you place a "Y" in the check column, copies the first 8 columns to the destination sheet. Have a try:
    Code:
    Option Explicit
    Private Sub Worksheet_Change(ByVal Target As Range)
        
        Dim ws1 As Worksheet
        Dim ws2 As Worksheet
        Dim tRow As Long
        Dim nRow As Long
        
        If Target.Cells.Count > 1 Then Exit Sub
        If Not Intersect(Target, Range("M:M")) Is Nothing Then                'adjust for check column
            If UCase(Target.Value) = "Y" Then
                Set ws1 = Worksheets("ORIGIN")
                Set ws2 = Worksheets("DESTINATION")
                tRow = Target.Row
                nRow = ws2.Cells(Rows.Count, 1).End(xlUp).Row + 1
                ws1.Range("A" & tRow).Resize(, 8).Copy ws2.Range("A" & nRow)  '(, 8) adjust for # columns to copy
            End If
        End If
    End Sub
    Attached Files Attached Files
    Last edited by rollis13; 09-14-2013 at 12:52 PM.

Similar Threads

  1. Replies: 7
    Last Post: 08-28-2013, 12:57 AM
  2. Free memory from object using copymemory Api function
    By Kamil Zien in forum Excel Help
    Replies: 0
    Last Post: 05-29-2013, 12:51 PM
  3. Replies: 7
    Last Post: 05-17-2013, 10:38 PM
  4. Print Nth Worksheet To Mth Worksheet using VBA
    By Ryan_Bernal in forum Excel Help
    Replies: 2
    Last Post: 02-28-2013, 06:57 PM
  5. Free U.S. ZIP CODE Database...
    By Rick Rothstein in forum Rick Rothstein's Corner
    Replies: 2
    Last Post: 12-02-2012, 08:38 AM

Posting Permissions

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