"If" and "then" formula's

A

Ana

Hello,

I need help on how to make this work, I have two formula's
that I am using:

=SUM(a1-b1+(b1<a1)*10/24) Formula for within 24 hrs
scenerio

=SUM(a1-b1+(a1<=b1)*10/24) Formula for outside of 24 hour
scenerio

How can I get it inputed so it will automatically know
that "IF" it is outside the 24 hr scenerio to use the
second formula? I would greatly appreciate this help!
 
D

dvt

Ana said:
Hello,

I need help on how to make this work, I have two formula's
that I am using:

=SUM(a1-b1+(b1<a1)*10/24) Formula for within 24 hrs
scenerio

=SUM(a1-b1+(a1<=b1)*10/24) Formula for outside of 24 hour
scenerio

How can I get it inputed so it will automatically know
that "IF" it is outside the 24 hr scenerio to use the
second formula? I would greatly appreciate this help!

Is this what you want?

=IF(a1<=b1,a-1b1+10/24,a1-b1+10/24)

Dave
dvt at psu dot edu
 
D

dvt

Oops - I transposed two characters in the formula. I hope that was obvious
to the OP. But just in case, instead of this:
=IF(a1<=b1,a-1b1+10/24,a1-b1+10/24)

try this:

=IF(a1<=b1,a1-b1+10/24,a1-b1+10/24)

Dave
dvt at psu dot edu
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top