willow1985
Well-known Member
- Joined
- Jul 24, 2019
- Messages
- 888
- Office Version
- 365
- Platform
- Windows
I am looking to find the Median of a data set but I only want the formula to consider certain cells.
The Median number I want found is in the column called [DTQ]
The only DTQ numbers I want it to consider are ones that are not labeled as Exclude in the [Customer Exlusions] Column, and have a Date Quoted between the two dates listed in E1 and F1
I wrote the below formula but I get a #NUM! error....
={ROUND(MEDIAN(IF(WO[Customer Exclusions]<>"Exclude",IF(WO[Date Quoted],">="&$F$1,IF(WO[Date Quoted],"<="&$E$1,WO[DTQ])))),0)}
Any help would be appreciated!
Thank you
Note: This is just an example, the original data set has over 22000 rows
Carla
The Median number I want found is in the column called [DTQ]
The only DTQ numbers I want it to consider are ones that are not labeled as Exclude in the [Customer Exlusions] Column, and have a Date Quoted between the two dates listed in E1 and F1
I wrote the below formula but I get a #NUM! error....
={ROUND(MEDIAN(IF(WO[Customer Exclusions]<>"Exclude",IF(WO[Date Quoted],">="&$F$1,IF(WO[Date Quoted],"<="&$E$1,WO[DTQ])))),0)}
Any help would be appreciated!
Thank you
Example.xlsx | ||||||||
---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | |||
1 | Date Quoted | DTQ | Customer Exclusions | 2020-08-01 | 2020-08-20 | |||
2 | 2020-08-20 | 3 | ||||||
3 | ||||||||
4 | 2020-08-20 | 4 | ||||||
5 | 2020-08-20 | 4 | ||||||
6 | Exclude | Median: | #NUM! | |||||
7 | 5 | |||||||
8 | 2020-08-18 | 2 | ||||||
9 | 2020-08-18 | 2 | ||||||
10 | 2020-08-18 | 7 | ||||||
11 | 2020-08-13 | 2 | ||||||
12 | 2020-08-17 | 6 | ||||||
13 | 2020-08-18 | 7 | ||||||
14 | 2020-08-19 | 8 | Exclude | |||||
15 | 2020-08-13 | 2 | ||||||
16 | 2020-08-20 | 10 | ||||||
17 | Exclude | |||||||
18 | 2020-08-18 | 9 | ||||||
19 | Exclude | |||||||
20 | 2020-08-17 | 11 | ||||||
21 | 2020-08-11 | 5 | ||||||
22 | 2020-08-18 | 14 | Exclude | |||||
23 | 2020-07-13 | 5 | ||||||
24 | 2020-07-10 | 2 | ||||||
25 | 2020-07-14 | 6 | Exclude | |||||
26 | 2020-07-14 | 6 | ||||||
27 | 2020-07-13 | 5 | ||||||
28 | 2020-07-10 | 2 | ||||||
29 | 2020-06-11 | 2 | ||||||
30 | 2020-06-17 | 8 | Exclude | |||||
31 | 2020-06-11 | 2 | ||||||
Sheet1 |
Cell Formulas | ||
---|---|---|
Range | Formula | |
F6 | F6 | =ROUND(MEDIAN(IF(WO[Customer Exclusions]<>"Exclude",IF(WO[Date Quoted],">="&$F$1,IF(WO[Date Quoted],"<="&$E$1,WO[DTQ])))),0) |
F7 | F7 | =ROUND(MEDIAN(B2:B5,B8:B13,B15:B16,B18,B20:B21),0) |
Press CTRL+SHIFT+ENTER to enter array formulas. |
Named Ranges | ||
---|---|---|
Name | Refers To | Cells |
WOR | =Sheet1!$C$9 | F6 |
Note: This is just an example, the original data set has over 22000 rows
Carla
Last edited: