I am trying to create a conditional value in column D based on these three criteria:

If procedure is TOMO and there is only one order NUMBER associated with it then value is 0
If procedure if TOMO and there are multiple same order NUMBER associated with it then value is 1, but only for the procedures occurring AFTER the TOMO DATE.
If no TOMO is in a row, then the condition is false.
Excel1.jpg
Any help would be appreciated!