Filter data based on multiple columns
See if this array formula* approach works for you:
Assumptions:
Your data table is in A1:V10
MyNumber, MyDate, MyField_1, MyField_2.....MyField_20
Your pivot table begins in cell A20 and extends through B?? (depending on
returned values)
So...A20: Max of MyNumber
A21: MyNumber
B21: Total
C21: MyField_1
C22:
=INDEX($C$1:$C$10,MATCH($A22&"_"&TEXT($B22,"yyyymm dd"),$A$1:$A$10&"_"&TEXT($B$1:$B$10,"yyyymmdd"),0) )
Copy from C22 to C23 and down as far as needed
Copy the Col_C formulas to Col_D and as far to the right as needed
*Note: For array formulas, hold down [Ctrl] and [Shift] when you press
[Enter].
Those formulas return the data associated with each unique MyNumber and the
corresponding Max of MyDate for that MyNumber.
Sample returned values (with my test data):
Max of MyDate
MyNumber_____Total____Field_1__Field_2_____Field_3
1_________10/11/05_c101_______c101_______c101
2_________01/04/06_c10001_____c10001_____c10001
3_________08/26/05_c1000001___c1000001___c1000001
4_________11/04/05_c100000001_c100000001_c100000001
Is that something you can work with?
***********
Regards,
Ron
XL2002, WinXP-Pro
" wrote:
Yea, that worked, but now here's the next problem...I have about 20
columns after the first two columns, that I will also need to display
for that combination of column A&B. How can I do this with a
pivottable?
|