Jeffrey Mahoney
Well-known Member
- Joined
- May 31, 2015
- Messages
- 3,142
- Office Version
- 365
- Platform
- Windows
I'm trying to check how many IDs in column A that are not in column E. This is a simple example; my real data is different. Column A looks at column B and normally returns a portion of of the values in column. That formula leaves a blank, but not a true blank. So using Counta(A5:A14) returns 10 even though there are only 4 items. So I have to filter the items for true non-blanks.
The formula in Cell A2 has embedded filtered formulas for columns A and E, then doing the calculation and does not work. While the formula in cell D2 is using filters created in cells C5 and F5 respectively and does work.
Why doesn't the PIDS and PROJS variables store the proper data so the Counta and Countif functions can work? Do I need to reference the array differently when it comes from within the formula? As you can see in the screenshot below, the filter is providing the correct array.
The formula in Cell A2 has embedded filtered formulas for columns A and E, then doing the calculation and does not work. While the formula in cell D2 is using filters created in cells C5 and F5 respectively and does work.
Why doesn't the PIDS and PROJS variables store the proper data so the Counta and Countif functions can work? Do I need to reference the array differently when it comes from within the formula? As you can see in the screenshot below, the filter is providing the correct array.
Book3 | ||||||||
---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | |||
1 | Missing | Missing | ||||||
2 | #VALUE! | 1 | ||||||
3 | 10 | 4 | 4 | 10 | 4 | |||
4 | PID | ID | Filter | Projects | Filter | |||
5 | A | A | A | A | A | |||
6 | B | B | B | C | C | |||
7 | C | C | C | D | D | |||
8 | D | D | D | E | E | |||
9 | ||||||||
10 | ||||||||
11 | ||||||||
12 | ||||||||
13 | ||||||||
14 | ||||||||
Sheet1 |
Cell Formulas | ||
---|---|---|
Range | Formula | |
A2 | A2 | =LET(PIDS,FILTER($A$5:$A$14,$A$5:$A$14<>""),PROJS,FILTER($E$5:$E$14,$E$5:$E$14<>""),COUNTA(PIDS)-SUM(COUNTIF(PROJS,PIDS))) |
D2 | D2 | =COUNTA(C5#)-SUM(COUNTIF(F5#,C5#)) |
A3:C3,E3:F3 | A3 | =COUNTA(A5:A14) |
C5:C8 | C5 | =FILTER(A5:A14,A5:A14<>"") |
F5:F8 | F5 | =FILTER(E5:E14,E5:E14<>"") |
A5:A14 | A5 | =IF(B5<>"",B5,"") |
Dynamic array formulas. |