Results 1 to 9 of 9

Copy Row macro modification needed

Threaded View

  1. #1
    Forum Contributor
    Join Date
    07-30-2017
    Location
    texas
    MS-Off Ver
    2016
    Posts
    123

    Copy Row macro modification needed

    Hey everyone. I was wondering if someone could help me with this problem. I have a macro that copies rows and it does a great job, however, I need to modify it as follows: I need the macro to copy to a different column(other than A). Ideally, I would like the copied cells(Column A:D) to be copied over to Column I:L starting at row 31 and then advancing downward(this is where I am having problems). I have made several attempts to do this, but have been unsuccessful. Thanks in advance!
    Sub CopyRows()
    
    For Each chkbx In ActiveSheet.CheckBoxes
        If chkbx.Value = 1 Then
            For r = 1 To Rows.Count
                If Cells(r, 1).Top = chkbx.Top Then
                    With Worksheets("Wooden Bldg")
                        LRow = .Range("A" & Rows.Count).End(xlUp).Row + 1
                        .Range("A" & LRow & ":D" & LRow) = _
                        Worksheets("Wooden Bldg").Range("A" & r & ":D" & r).Value
                    End With
                    Exit For
                End If
            Next r
        End If
    Next
        For Each sh In Sheets
            On Error Resume Next
                sh.CheckBoxes.Value = False
            On Error GoTo 0
        Next sh
    End Sub
    Last edited by alansidman; 08-26-2017 at 09:15 PM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Slight modification needed, delete row if word found
    By fantom in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-14-2014, 07:20 AM
  2. [SOLVED] Modification Help Needed 649 Combination Generator Code
    By ssjagger in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 02-05-2013, 08:52 PM
  3. Macro modification needed
    By mdsickler in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 05-09-2011, 02:11 AM
  4. help needed for this little modification
    By ttik in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-31-2009, 12:20 AM

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