I am trying to write some code in excel using vb. I am trying to use a calculation of field E1 and enter it into feild F1 but I cant seem to get it. Here is what I am trying:
VB Code:
Sub date_timetest() Dim rCell As Range For Each rCell In Range( _ Range(E:E), _ Cells(Rows.Count, "E").End(xlUp)) If rCell.Value <> "" Then rCell.FormulaR1C1 = "=(RC[-1] -INT(RC[-1]))*24" End If Next rCell End Sub
Does this make any sense. I am new to coding so I am a little lost. Any help would be greatly appreciated, Thanks Neal.




Reply With Quote