English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

For work, we take out 30 minutes drive to our first account at the max. But if its less than 30 minutes, we only take out how long it took. So if it takes an hour, we show 30 min drive time. If it takes 15 min, we only take out 15 minutes for drive time from our daily hours worked. How do I put that into a formula?

2007-07-22 17:44:05 · 2 answers · asked by texas_wassail 1 in Computers & Internet Software

2 answers

=IF((B1-A1)>(30/1440),30/1440,B1-A1)

B1 - Higher Value - time
A1 - Other one

(30/1440) means 30 minutes of a day (24 x60)

The answer should be left in the same time format you have used in A & B. (i guess HH:MM) . Below is how you should type it in the if function formula boxes. (Insert - functions - if)

Argument - (B1-A1)>(30/1440)
If true - 30/1440
If false - B1-A1

2007-07-23 02:54:38 · answer #1 · answered by voyager 6 · 0 0

B1 and A1 need to be formated as datetime to make this work.

=MIN((B1-A1)*24*60, 30)

2007-07-22 17:52:55 · answer #2 · answered by Michael M 6 · 0 0

fedest.com, questions and answers