Help with Formula please

Hi Friends

Requesting your help for the below in excel. For ease of convenience, I attached the example in word attachment to retain formatting.

If S.No is same (e.g. 123), Kick is present in G2, then C2 (e.g. ABC) should be present in Column C for the same S.NO.
Based on above, C2 is repeated in C5. Then date in D5 must be on or after D2 date and before F2 date (since D2 & F2 are corresponding dates of C2 where initial ABC is present. If F2 had been blank, then D5 must be within 10 days of D2).

Regards
Krishna

AttachmentSize
e.g..doc43 KB