Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #5  
Old 03-30-2018, 03:10 PM
NoSparks NoSparks is offline Need Macro to Move Text in a Row Windows 7 64bit Need Macro to Move Text in a Row 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
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
macro to move cells ewso Excel Programming 1 10-11-2017 12:23 AM
Need Macro to Move Text in a Row A macro to find a symbol, delete it, and move the cursor to that location JayBird24 Word VBA 1 08-19-2016 04:26 PM
How to move data - Macro not working ecarter312 Excel Programming 1 08-10-2016 11:26 PM
Need Macro to Move Text in a Row Macro to move focus after entry in a cell Phil H Excel Programming 3 06-18-2015 01:20 PM
Macro - Can I move information from a website and excel to word? redzan Word VBA 1 03-13-2013 07:39 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 12:45 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft