Can anyone help me please

Status
Not open for further replies.

sdc1234

Board Regular
Joined
Mar 17, 2011
Messages
122
OK, try this, Paste this into a module, and run it;
Code:
Sub MoveDate()
    
    Select Case Range("AI3").Value
    Case Is = ""
    Range("Z3:AA3").Select
    Selection.Cut
    Range("AI3").Select
    ActiveSheet.Paste
    
    Case Else
    
    Range("AI3").Select
    Range(Selection, Selection.End(xlToRight)).Select
    Selection.Copy
    Range("AK3").Select
    ActiveSheet.PasteSpecial Format:=3, Link:=1, DisplayAsIcon:=False, _
        IconFileName:=False
        
    Range("Z3:AA3").Select
    Selection.Cut
    Range("AI3").Select
    ActiveSheet.Paste
    End Select
End Sub
How can I get this code to autorun as soon as I open the worksheet please help I know it is something I am just not sure what the code is
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
Status
Not open for further replies.

Forum statistics

Threads
1,224,504
Messages
6,179,144
Members
452,891
Latest member
JUSTOUTOFMYREACH

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top