Complex IFS Formula Issue

robatthe2A

New Member
Joined
Dec 27, 2024
Messages
12
Office Version
  1. 365
Platform
  1. Windows
Good Morning-

Having some trouble with this equation where I have the calculation set correctly based on the criteria, but I need it to adjust if the annual balance goes below 80 hours. Once below 80 hours in column F I need column H to never be above column F and only deduct if the code entered is applicable based on the parameters set.

=IFS(ISBLANK(D15),"",F14-B15<(--"80:00"),F15,D15="Paid Time Off",H14-0,D15="Paid Sick and Safe Time",H14-B15,D15="Bereavement Paid",H14+0,D15="Civic Duty",H14+0,D15="Emergency Leave - Disaster Area Paid",H14+0,D15="Emergency Leave - Non Disaster Area Paid",H14+0,D15="FMLA Unpaid",H14+0,D15="Intermittent FMLA Paid Time Off PSST",H14-B15,D15="Intermittent FMLA No Pay",H14+0,D15="Intermittent FMLA Paid Time Off PTO",H14-B15,D15="STD Elimination Period Paid PTO",H14-B15,D15="STD Elimination Period - Unpaid",H14+0,D15="STD Elimination Period - Paid PSST",H14-B15,D15="STD Elimination Period Paid PTO",H14-B15,D15="Short Term Disability 70% Paid",H14+0,D15="Short Term Disability 100% Paid",H14+0,D15="Partial STD 70%",H14+0,D15="Partial STD 100%",H14+0,D15="LOA Pending Unpaid",H14+0,D15="LOA Pending Paid",H14-0,D15="Denied LOA",H14+0,D15="Leave as Accommodation",H14+0,D15="Military Leave Active Duty Paid",H14+0,D15="Military Leave Active Duty Unpaid",H14+0,D15="Military Leave Non Active Duty Paid",H14+0,D15="Military Leave Active Duty Paid",H14+0,D15="Paid Early Release",H14+0,D15="Parental Leave Paid",H14+0,D15="Pending Return to Work",H14+0,D15="Personal Leave Paid",H14+0,D15="Personal Leave Unpaid",H14+0,D15="Parental Intermittent Paid",H14+0,D15="Restricted Emergency Time",H14+0,D15="State PFML Unpaid",H14+0)
 

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.
Hi and welcome to MrExcel.

You could reduce your formula to the following:

Excel Formula:
=IFS(D15="","",F14-B15<(--"80:00"),F15,COUNTIF(AA:AA,D15),H14+0,COUNTIF(AB:AB,D15),H14-0,COUNTIF(AC:AC,D15),H14-B15)

But you will have to separate into columns when you want H14+0 or H14-0 or H14-B15, (I don't understand why you have H14+0 and H14-0, the result is the same, but I put it in separate columns anyway).
This way you can add more concepts to the formula in a simpler way.

varios 27dic2024.xlsm
ABCDEFGHZAAABAC
10
118H14+0H14-0H14-B15
12Bereavement PaidPaid Time OffPaid Sick and Safe Time
13Civic DutyLOA Pending PaidIntermittent FMLA Paid Time Off PSST
1410020Emergency Leave - Disaster Area PaidIntermittent FMLA Paid Time Off PTO
1512Paid Sick and Safe Time50Emergency Leave - Non Disaster Area PaidSTD Elimination Period Paid PTO
16FMLA UnpaidSTD Elimination Period - Paid PSST
17Intermittent FMLA No PaySTD Elimination Period Paid PTO
18STD Elimination Period - Unpaid
19Short Term Disability 70% Paid
20Short Term Disability 100% Paid
21Partial STD 70%
22Partial STD 100%
23LOA Pending Unpaid
24Denied LOA
25Leave as Accommodation
26Military Leave Active Duty Paid
27Military Leave Active Duty Unpaid
28Military Leave Non Active Duty Paid
29Military Leave Active Duty Paid
30Paid Early Release
31Parental Leave Paid
32Pending Return to Work
33Personal Leave Paid
34Personal Leave Unpaid
35Parental Intermittent Paid
36Restricted Emergency Time
37State PFML Unpaid
Hoja1
Cell Formulas
RangeFormula
F11F11=IFS(D15="","",F14-B15<(--"80:00"),F15,COUNTIF(AA:AA,D15),H14+0,COUNTIF(AB:AB,D15),H14-0,COUNTIF(AC:AC,D15),H14-B15)


Now, returning to your original question and with a simplified formula. Explain with examples what you need.

You can give the examples using minisheets, as I have done, using XL2BB tool.

Note XL2BB:
MrExcel has a tool called “XL2BB” that lets you post samples of your data that will allow us to copy/paste it to our Excel spreadsheets, so we can work with the same copy of data that you are. Instructions on using this tool can be found here: XL2BB Add-in
Note that there is also a "Test Here” forum on this board. This is a place where you can test using this tool (or any other posting techniques that you want to test) before trying to use those tools in your actual posts.​

----- --
I hope to hear from you soon.
Respectfully
Dante Amor
----- --
 
Last edited:
Upvote 0

Forum statistics

Threads
1,225,142
Messages
6,183,115
Members
453,148
Latest member
yevhen

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