Hi
Forget about nested ifs. They get tooooo messy. Cases do the same thing and are easier to visualise.
Sub MyMacro()
Dim MyValue
MyValue = the number you want or a range to where the number is.
'Your Code Here
Select Case MyValue
Case is <5:54
range("A1").formular1c1=4
Case 6:55 to 7:00
range("A1").formular1c1=3
case 7:01 to 7:10
range("A1").formular1c1=2
case is > 7:11
range("A1").formular1c1=1
case else
msgbox("I dont know what to do."),vbcritical,"Error"
'Your Code Here
End Sub
HTH
Jacob
I assumed these times were minutes and seconds. I further assumed anything 5:54 and below should be n/a, and antything above 7:11 to get a 1.
assuming your time A1,
=VLOOKUP(A1*86400,{0,"n/a";354.01,4;415,3;421,2;431,1},2)
good luck