hello im new here and trying hard in programming
im trying to program this pseudo code in VBA excel
but so far im stuck with this non-working code
the If ActiveCell.Offset(0, 1).Value >= TimeSerial(8, 0, 0) Then is returning false so i guess i do not know how to properly apply If conditional statements to timevalues, so i need help, thanks for any help
im trying to program this pseudo code in VBA excel
Code:
reghrs
if totalhrs >= 8 then
reghrs = 8
else
if ((totalhrs - 8) <= 0) then
reghrs = 0
else
reghrs = roundup(totalhrs)
end if
end if
but so far im stuck with this non-working code
Code:
Sub RegHrs()
With ActiveCell.Offset(0, 2)
.NumberFormat = "0.00"
If ActiveCell.Offset(0, 1).Value >= TimeSerial(8, 0, 0) Then
.Value = 8
End If
End With
End Sub
the If ActiveCell.Offset(0, 1).Value >= TimeSerial(8, 0, 0) Then is returning false so i guess i do not know how to properly apply If conditional statements to timevalues, so i need help, thanks for any help