Reputation: 5542
I am trying to lookup a col4 value when, in the same row, col1, col2 and col3 each match.
I referenced this SO Post as it is a similar question but that solution is not working for me.
I am searching for specific Source
s, on specific Date
s, with specific Status
s and want to return the corresponding Count
s.
My data with examples of output required:
Upvotes: 4
Views: 34861
Reputation: 59485
May not be preferred approach and might not even give the correct answer but for anyone new to PivotTables the sooner they are comfortable with them the more effort they are likely to save themselves:
Select your dataset (A1:D16 above), Insert > Tables – PivotTable, PivotTable. Choose New Worksheet or, as here, Existing Worksheet Location F1. Drag the fields from the upper box into the smaller boxes as shown. The rest is just formatting, unless complicated by specific requirements for treatment of Src All
.
Upvotes: 1
Reputation: 626
To use INDEX()
and MATCH()
with multiple lookup fields, you must commit it as an array formula. Use nested IF()
statements to select for each criteria. You have to push CTRL+SHIFT+ENTER to enter a formula as an array formula.
=INDEX(col4,
MATCH(criteria1,
IF(col2=criteria2,
IF(col3=criteria3,
col1
)),
0)
)
If you entered it correctly with CTRL+SHIFT+ENTER, you will see curly braces around the formula { }
Also see this article from Microsoft
Upvotes: 4