This is driving me nuts and I can't see why what I am doing won't work.

SR
CL
06:15

06:15
07:06
07:07
07:35
07:36
. . . .
. . . .
. . . .

The letters SR and CL are in cells N38 and N39. They are code for an origin (N38) and a destination (N39). According to the pairing of these and other codes the vertical time output shown in (N42:N46) changes. The 06:15 is a start time.

I am trying to write a formula for N47, which should be something like this

=IF(OR(N$38="AY",N$38="GV”,N$38="SR”),AND(N$39="CL",N$39="KM")),N$46+$A$28, ". . . .")

In other words if the following combination of origin and destination codes are put in to N38 and N39, (N$38="AY",N$38="GV”,N$38="SR”) and (N$39="CL",N$39="KM")), N47 will give me a result of adding a value to N46.

Can someone advise what that forumals should be and the syntax to use as I've tried most combinations I can think of and get nothing like the answer I need!