How JustAnswer Works:
  • Ask an Expert
    Experts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional Answer
    Via email, text message, or notification as you wait on our site. Ask follow up questions if you need to.
  • 100% Satisfaction Guarantee
    Rate the answer you receive.
Ask Zabo04 Your Own Question
Zabo04, Computer Enthusiast
Category: Microsoft Office
Satisfied Customers: 283
Experience:  Experienced in Word, Excel, Access, Powerpoint, and Outlook.
Type Your Microsoft Office Question Here...
Zabo04 is online now
A new question is answered every 9 seconds

I am trying to use an if formula and a mod formula together.

Customer Question

I am trying to use an if formula and a mod formula together. the if formula is
The Mod formula is
I'm running into a problem computing flight time For example: In L8 I have 00:05 and in G9 I have 23:55. I want the answer to be 00:10 min.
Help Please
Submitted: 1 year ago.
Category: Microsoft Office
Expert:  Zabo04 replied 1 year ago.

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))

Expert:  Zabo04 replied 1 year ago.

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.

Customer: replied 1 year ago.
I think it works.Thanks a lot!!
Expert:  Zabo04 replied 1 year ago.

No problem. Please do not forget to rate my service today. Thank you.