FrenchCelt
Board Regular
- Joined
- May 22, 2018
- Messages
- 214
- Office Version
- 365
- Platform
- Windows
Hello,
I have a formula that works well if I insert directly into a cell (Duration Past Clock Out):
=INT(F2-E2)&" days "&TEXT(F2-E2,"h"" hrs ""m"" mins """)
I get this output:
But when I put it in a macro I have to format this data:
Range("H2").Select
ActiveCell.FormulaR1C1 = "=INT(F2-E2)&" days "&TEXT(F2-E2,"h"" hrs ""m"" mins """)"
I get:
Does anyone know what I'm doing incorrectly?
I have a formula that works well if I insert directly into a cell (Duration Past Clock Out):
=INT(F2-E2)&" days "&TEXT(F2-E2,"h"" hrs ""m"" mins """)
I get this output:
Employee ID | Activity Name | Tran # | Begin Time | Clock Out Time | End Time | Supervisor | Duration Past Clock Out |
jsmith | LM CLEAN | 47661487 | 8/22/2021 17:51 | 8/22/2021 18:01 | 8/28/2021 6:15 | OF_12A | 5 days 12 hrs 14 mins |
But when I put it in a macro I have to format this data:
Range("H2").Select
ActiveCell.FormulaR1C1 = "=INT(F2-E2)&" days "&TEXT(F2-E2,"h"" hrs ""m"" mins """)"
I get:
Does anyone know what I'm doing incorrectly?