Reputation: 3
I have a table where one column is for salaries of employees. There are two other columns next to it, one with the minimum salary and the other with the median salary. I would like to write a formula that in one cell would count the number of employees that have their salary greater than the minimum but less than the median.
I have tried various approaches, including things like =SUM(IFS(D28:D48<F28:F48,1, D28:D48>E28:E48,1))
So, in essence, there should be one cell that shows the count where amounts in the salary column are larger than the amounts in minimum column but smaller than amounts in median column.
Upvotes: 0
Views: 355
Reputation: 6281
Try this:
=COUNTIFS(D1:D7,">"&E1,D1:D7,"<"&F1)
Adjust to your data
=COUNTIFS(D28:D48;">"&E28;D28:D48;"<"&F28)
With different limits in rows: (array formula)
=SUM((D$2:D$6>E$2:E$6)*(D$2:D$6<F$2:F$6))
Upvotes: 0