May be this......

In H12.....

=IF(D12="","",IF(C12<500,D12/24,D12/12))
and then drag down.