You don't say how the code doesn't work but try this.
![]()
Sub CalcLengths() Dim lastrow As Long lastrow = Cells(Rows.Count, "F").End(xlUp).Row With Range("G2:G" & lastrow) .FormulaR1C1 = "=RC[-5]*1" .NumberFormat = "h:mm" End With End Sub
You don't say how the code doesn't work but try this.
![]()
Sub CalcLengths() Dim lastrow As Long lastrow = Cells(Rows.Count, "F").End(xlUp).Row With Range("G2:G" & lastrow) .FormulaR1C1 = "=RC[-5]*1" .NumberFormat = "h:mm" End With End Sub
If posting code please use code tags, see here.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks