Formula help

Joined
Aug 17, 2011
Messages
1
Reaction score
0
I need help creating a formula which can take 2 values, in hours, A2 & A1, subtract them A2-A1, and if the difference is less than 2, output 2, but if it is greater than 2, output the value.

Something like =If((a2-a1)>0<2,2,(a2-a1)), but this just gives me errors & I cannot figure out what needs to change to get the correct output.

Say you have in A1 - 13:30 & in A2 - 14:25, this should return 2:00, because it is less then 2:00.
But if it was A1 - 12:00 & A2 - 16:00 it would return 4:00 since it is greater than 2:00.

I would also like it to have a value of 0:00 if the referenced cells are blank.
 

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

Similar Threads


Top