Hi all,
I've been using the below to place a formula in V2 and autofill it to my last Column.
.Cells(1,lCol) refers to V1, the offset makes it V2. This part is already dynamic, but I'm not sure how I'd go about using the same process for
Is it going to be something like
? No idea how close that is
Thanks for any help
I've been using the below to place a formula in V2 and autofill it to my last Column.
VBA Code:
With ws
.Cells(1, lCol).Offset(1, 0).FormulaR1C1 = _
"=IF(RC[-4]-RC[-6]<0, ""-"" & TEXT(ABS(RC[-4]-RC[-6]),""d hh:mm:ss""), RC[-4]-RC[-6])"
.Cells(1, lCol).Offset(1, 0).AutoFill Destination:=.Range("V2:V" & lRow)
.Range("V2:V" & lRow).NumberFormat = "[$-x-systime]d h:mm:ss AM/PM"
end ws
.Cells(1,lCol) refers to V1, the offset makes it V2. This part is already dynamic, but I'm not sure how I'd go about using the same process for
VBA Code:
.Range("V2:V" & lRow)
Is it going to be something like
VBA Code:
.Range(cells(1,lCol).offset(1,0) &":" &cells(lRow,lCol))
Thanks for any help