Forum Discussion
PFGraham
Jun 01, 2023Copper Contributor
CountIF or SumIf or SubtotalIf - array question
Hello Excel Geniuses,
I'm working on an insane spreadsheet that I 'got hold' of, trying to do some extractions on desperate sets within it.
Anyway, the problem today is related to this set: 3 columns: ID, Spend, variable . Looks like this:
| ID | Spend | variable |
| 1 | $4,500 | x |
| 2 | $0 | |
| 3 | $9,000 | x |
| 4 | $5,000 | x |
| 5 | $16,000 | x |
| 6 | $0 | |
| 7 | $6,000 | x |
| 8 | $0 | x |
| 9 | $21,632 | |
| 10 | $0 | x |
| 11 | $0 | |
| 12 | $14,300 | |
| 13 | $6,000 | x |
| 14 | $15,000 | x |
| 15 | $3,000 | x |
| 16 | $19,805 | |
| 17 | $9,000 | x |
| 18 | $16,000 | |
| 19 | $3,750 | x |
| 20 | $0 | x |
| 21 | $7,500 | x |
| 22 | $12,678 | |
| 23 | $27,000 |
I trying to find the Average of Spend IF Variable="x" AND not to include any Spends in the Average calculation if $0.
So, only give me the Average if it's a X in the Variable column but don't drag down the Average calculation with any $zero spends.
Thanks!
4 Replies
- SergeiBaklanDiamond Contributor
- PFGrahamCopper ContributorAnother way - I'll try that next, mostly for fun and to understand FILTER (never heard of that before).
Very cool, thanks!
- PFGrahamCopper Contributor