Percentile ifs in tables returning same value

Doblez

New Member
Joined
Apr 21, 2021
Messages
2
Office Version
  1. 365
Platform
  1. Windows
Hey,
I am trying to calculate a percentile of salleries in a table if they've worked between 24 and 60
MonthsWorkedSallery
2212124
2312462
2412521
2412523
28125232
6013542
6213800

What I've done so far which actually works:
25% Percentile sallery Monthsworked <24
Formula 1
Excel Formula:
{=PERCENTILE.EXC(IF(Table1[MonthsWorked]<"24";Table1[Sallery]);0,25)}
- Works as intended

Average if 24<MonthsWorked<24
Formula 2
Excel Formula:
AVERAGEIFS(Table1[Sallery];Table1[MonthsWorked];">24";Table1[MonthsWorked];"<60")
- Works as inteded

What I can't get to work:
Formula 3
Excel Formula:
{=PERCENTILE.EXC(IFS(Table1[MonthsWorked]<E$32;Table1[Sallery];Table1[MonthsWorked]>D$32;Table1[Sallery]);0,25)}
Returns the same as formula 1 even though it shouldn't.

I also tried this
Formula 4
Excel Formula:
{=PERCENTILE.EXC(IF(AND(Table1[MonthsWorked]>D$32;Table1[MonthsWorked]<E$32);Table1[Sallery]);0,25)}
Returns a num error

Do you have any clue as to how I would fix it or what's wrong? I am running them as array formulas with ctrl+shift+enter. (My tries are based off of this.
Ideally I'd like the 0.25, 0.5 and 0.75 percentile of the following:
MonthsWorked<24
24<MonthsWorked<60
60<MonthsWorked<120
Monthsworked>120


I have attached the original dataset for good measure.
In advance thanks for your help!
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
In your first formula, since you're searching for a number and not text, you'll need to remove the quotes around the number 24. So your formula should be as follows...

=PERCENTILE.EXC(IF(Table1[MonthsWorked]<24;Table1[Sallery]);0,25)

...confirmed with CONTROL+SHIFT+ENTER. Now, based on the criteria, the formula should return the error value #NUM!.

Hope this helps!
 
Upvote 0
For your fourth formula, which includes multiple criteria, try...

=PERCENTILE.EXC(IF(Table1[MonthsWorked]>D$32;IF(Table1[MonthsWorked]<E$32;Table1[Sallery]));0,25)

...confirmed with CONTROL+SHIFT+ENTER.

Hope this helps!
 
Upvote 0

Forum statistics

Threads
1,223,885
Messages
6,175,183
Members
452,615
Latest member
bogeys2birdies

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