PDA

View Full Version : Solved: Return result up to a maximum



Sir Babydum GBE
03-08-2012, 11:17 AM
Hi

I'm working on a formula that has many parts, and I need to save my IFs for nestings.

Is there a formula that will calculate the following please?

Our staff sign in the time (to the second) in A1. When they go home they sign out (B1).

In C1 how do I (without using IFs) subtract A1 from B1 to return the time worked, rounded (up/down) by 15 minute intervals? BUT, the maximum result returned should be 8 (hours)?

Thx in advance

Damian

Paul_Hossler
03-08-2012, 11:59 AM
=MIN(8,ROUND(4*24*(B1-A1),0)/4)


Seems to work (I think)

Paul

Sir Babydum GBE
03-09-2012, 06:27 AM
=MIN(8,ROUND(4*24*(B1-A1),0)/4)


Seems to work (I think)

Paul...like a charm!

Thx very much Paul

BD (Sir)

shrivallabha
03-09-2012, 08:52 AM
Sir, you didn't mark it as "SOLVED"!

Sir Babydum GBE
03-11-2012, 07:28 AM
Sir, you didn't mark it as "SOLVED"!Oops! Forgotten I needed to do that!