Noid67
New Member
- Joined
- Feb 18, 2024
- Messages
- 11
- Office Version
- 365
- Platform
- Windows
Not sure why I am getting the Run-time 1004 error message for this With statement:
This line is the culprit:
.Range("M2:M" & .Cells(.Rows.count, "L").End(xlUp).Row).FormulaR1C1 = _
"=INT(RC[-1]/1440)&"" ""&TEXT(RC[-1]/1440-INT(RC[-1]/1440),""hh:mm:ss)"""
This line is the culprit:
.Range("M2:M" & .Cells(.Rows.count, "L").End(xlUp).Row).FormulaR1C1 = _
"=INT(RC[-1]/1440)&"" ""&TEXT(RC[-1]/1440-INT(RC[-1]/1440),""hh:mm:ss)"""
VBA Code:
With Sheet8 'Sheet8 = SSP_Core
.Range("I1").value = "SDT"
.Range("J1").value = "Trailer ID"
.Range("K1").value = "Seal"
.Columns("L:L").Insert shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
.Range("L1").value = "REMOVE3"
.Range("M1").value = "Dwell Time"
.Range("M2:M" & .Cells(.Rows.count, "L").End(xlUp).Row).FormulaR1C1 = _
"=INT(RC[-1]/1440)&"" ""&TEXT(RC[-1]/1440-INT(RC[-1]/1440),""hh:mm:ss)"""
End With