View Single Post
 
Old 03-30-2018, 03:10 PM
NoSparks NoSparks is offline Windows 7 64bit Office 2010 64bit
Excel Hobbyist
 
Join Date: Nov 2013
Location: British Columbia, Canada
Posts: 842
NoSparks is a glorious beacon of lightNoSparks is a glorious beacon of lightNoSparks is a glorious beacon of lightNoSparks is a glorious beacon of lightNoSparks is a glorious beacon of light
Default

a more simplistic option...

Column M through column S is 7 columns so columns C through I will be moved (that's the 7 in the resize part)
Code:
Sub Move_Stuff()

    Dim cl As Range

Application.ScreenUpdating = False

With ActiveSheet
    For Each cl In .Range("C2", .Range("C" & Rows.Count).End(xlUp))
        If cl.Value = "ANNUAL LEAVE REGULAR HOURS" Then
            cl.Offset(-2, 10).Resize(, 7).Value = cl.Resize(, 7).Value
            cl.Resize(, 7).ClearContents
        End If
    Next cl
End With

Application.ScreenUpdating = True

End Sub
Reply With Quote