From what you have described you should be able to insert the mod into the if statement as follows: =IF(G10>0,MOD(G10-G9,1),MOD(L8-G9,1))
The best way to work these problems would be to establish the if statement, like you have, so =if( condition here, cell1, cell2 ), which allows you to define your condition to go to either the value in cell1 or cell2. You already know that, and I'm not talking down to you I'm just walking you through how I work. So in cell1 I have a formula and in cell2 I have a formula. Now I often have it stretched out to a chain of cells. What I do to collapse down to one large formula is then click on the cell and copy the formula from the formula bar, without the equal sign, and paste it into the cell reference in the calling formula. I keep doing that until I'm done.
In your case start with =IF(G10>0,g12, g13), in g12 (or wherever you want) put =MOD(G10-G9,1), g13 =MOD(L8-G9,1). When you collapse you just copy and paste from g12 into where you have your formula over the g12 reference. When you build in this way you can have a very complicated formula broken into parts for development and troubleshooting.
No problem. Please do not forget to rate my service today. Thank you.