formula to stop calculating once a number is reached

MiroUna

New Member
Joined
Dec 1, 2022
Messages
2
Office Version
  1. 365
Platform
  1. Windows
Hello everyone,
I am new to excel and just know how to use some of basic formulas.
So I created work book for bonus structure and I am stuck one formula. Work book has 12 sheets, one sheet for each month of the year and each sheet has two cells for first and second pay period of the month. To explain a bit more company pays 3 sick days in a year and they don't affect bonus. So lets say person has 1 sick day in first pay period of January and 1 sick day in second pay period of January. Formula will have to add them to holiday days in those periods. Lets say that same person has 1 more sick day in May, formula will add that sick day to holiday cell of the same pay period. Since person used his 3 payed days any other sick days will not be counted how ever we want to be able to keep adding them so we have total of sick days on the end of the year. Other example if person has 4 sick days in row formula will have to add 3 sick days to holiday cell and not count the 4th one or 5th one depending on how many days in a row did they have. . Other example: if person has 2 sick days in same pay period formula will add them to holiday cell of that pay period, if same person has two more sick days in other months of the same year formula will have to add 1 sick day to holiday cell instead 2 since we are allowed only 3 paid sick days. Goal is to have formula adding max of 3 sick days once person used up his/hers paid sick days it will stop adding them to holidays cell. I have feeling that formula will have to have some if; sum; max functions not quit sure since i am not that good in excel.
I tried to create it but it doesn't work for me. I have separate column that counts SUM of all sick days, might help to mention since I am not able to attach full work sheet. Rows in a sheet are different people.
One work book has12 sheets, 24 pay periods and SUM cells for sick days. All sick cells will have to work across work book. I am attaching just portion of work book since size of the sheet is to big to upload here. Here is example of just important section.

Copy for forum.xlsx
CDEFGH
61st Pay Period Paid Hours1st Pay Period Vacation Days/Traning Days1st Pay Period Sick Days2nd Pay Period Paid Hours2nd Pay Period Vacation Days/Traning Days2nd Pay Period sick Days
70.00000.0000
80.00000.0000
90.00000.0000
100.00000.0000
110.00000.0000
120.00000.0000
130.00000.0000
140.00000.0000
150.00000.0000
Jan
Cells with Conditional Formatting
CellConditionCell FormatStop If True
E7Expression=$U7>3textNO
H7Expression=$U7>3textNO
E8Expression=$U8>3textNO
F7:F15Expression=$F7<=0textNO
C18,C7:C16,C20:C30Expression=$C7<=0textNO
C7:C18Expression=$C7>=(($D$3-$D7)*8)*1.1textNO
F7:F15Expression=$F7>=(($D$4-$G7)*8)*1.1textNO
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
Not sure exactly if I read your post as you intended but the below might help hopefully...

asd.xlsx
BCDEFGHIJKLMNOP
1JFMAMJJASONDTotal Sick DaysBonus Deduction
2Person 111130
3Person 23256313
4Person 31120
Sheet1
Cell Formulas
RangeFormula
O2:O4O2=IF(SUM(C2:N2) >3, 3,SUM(C2:N2))
P2:P3P2=SUM(C2:N2)-3
P4P4=IF((SUM(C4:N4)-3) <0, 0, (SUM(C4:N4)-3))
 
Upvote 0
Not sure exactly if I read your post as you intended but the below might help hopefully...

asd.xlsx
BCDEFGHIJKLMNOP
1JFMAMJJASONDTotal Sick DaysBonus Deduction
2Person 111130
3Person 23256313
4Person 31120
Sheet1
Cell Formulas
RangeFormula
O2:O4O2=IF(SUM(C2:N2) >3, 3,SUM(C2:N2))
P2:P3P2=SUM(C2:N2)-3
P4P4=IF((SUM(C4:N4)-3) <0, 0, (SUM(C4:N4)-3))
I will try to plug them in and see how it works.
Thank you a lot for taking your time to help me out. I will let you know how did it go.
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,284
Members
452,630
Latest member
OdubiYouth

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top