Hi
I have 4 columns all containing hours. If any of the cells contain less than 40 I need a penalty.
Week 1 = C2
Week 2 = H2
Week 3 = M2
Week 4 = R2
=If C2<40, or H2<40, or M2<40, or R2<40 Then X2 = (TRUE PART)B2 * Total Hours, (FALSE PART)F2+K2+P2+U2
The formula should look to see if any of C2",H2,M2,R2 are less than 40. if so return the TRUE PART else return the FALSE PART
I'm not sure of the syntax.
Cheers
If OR Calculation
-
- SilverLounger
- Posts: 1728
- Joined: 25 Jan 2010, 08:34
- Location: Stoke on Trent - Staffordshire - England
If OR Calculation
Cheers ...
Dave.
Dave.
-
- Administrator
- Posts: 78416
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: If OR Calculation
How about
=IF(MIN(C2,H2,M2,R2)<40,B2*SUM(C2,H2,M2,R2),SUM(F2,K2,P2,U2))
=IF(MIN(C2,H2,M2,R2)<40,B2*SUM(C2,H2,M2,R2),SUM(F2,K2,P2,U2))
Best wishes,
Hans
Hans
-
- SilverLounger
- Posts: 1728
- Joined: 25 Jan 2010, 08:34
- Location: Stoke on Trent - Staffordshire - England
Re: If OR Calculation
Nearly Hans.
The formula should look at C2 H2 M2 R2, and if any of them contain less than 40 (Not the total of all) then return the TRUE PART, esle FALSE PART.
So I could have C2=39, H2=60 M2=58, R2=51 Because C2<40 return TRUE PART
The formula should look at C2 H2 M2 R2, and if any of them contain less than 40 (Not the total of all) then return the TRUE PART, esle FALSE PART.
So I could have C2=39, H2=60 M2=58, R2=51 Because C2<40 return TRUE PART
Last edited by D Willett on 06 Aug 2021, 15:41, edited 1 time in total.
Cheers ...
Dave.
Dave.
-
- Administrator
- Posts: 78416
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
-
- SilverLounger
- Posts: 1728
- Joined: 25 Jan 2010, 08:34
- Location: Stoke on Trent - Staffordshire - England
Re: If OR Calculation
Sorry Hans, you were correct... It works fine...
Thanks again for the support
Thanks again for the support
Cheers ...
Dave.
Dave.
-
- Administrator
- Posts: 78416
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: If OR Calculation
If any of the hours is less than 40, the minimum will be less than 40 and vice versa...
Best wishes,
Hans
Hans