Patrick Niedermeyer
New Member
- Joined
- Apr 10, 2020
- Messages
- 7
- Office Version
- 365
- Platform
- Windows
Why doesn't the function that I entered into a cell return the requested data, specifically if I wrote the function in the cell while recording a macro?
-P.
Sub Auto_Timesheet()
'
' Auto_Timesheet Macro
'
' Keyboard Shortcut: Ctrl+v
'
Columns("F:F").Select
Range("F2").Activate
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
Range("F2").Select
ActiveCell.FormulaR1C1 = "Cost Code Only"
Range("F3").Select
ActiveCell.FormulaR1C1 = "=left(E3,4)"
Range("F3").Select
End Sub
-P.
Sub Auto_Timesheet()
'
' Auto_Timesheet Macro
'
' Keyboard Shortcut: Ctrl+v
'
Columns("F:F").Select
Range("F2").Activate
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
Range("F2").Select
ActiveCell.FormulaR1C1 = "Cost Code Only"
Range("F3").Select
ActiveCell.FormulaR1C1 = "=left(E3,4)"
Range("F3").Select
End Sub