I'm trying to fix a macro code which can get the maximum values (array formula - =MAX-IF) and the other values on the same using (multiple array formula =INDEX). However I find this method to be really slow. I have tried different ways ie. using dynamic named range but still find this slow.
I need to find the value for Column C, D and E for Sheet2. I'm using the following array formula:
[C2] {=MAX(IF((Sheet1!C$1:C$2000=A2)*(Sheet1!D$1:D$2000=B2),Sheet1!E$1:E$2000))}
[D2] {=INDEX(Sheet1!F$1:F$2000,MATCH(1,(C2=Sheet1!$E$1:$E$2000)*(A2=Sheet1!$C$1:$C$2000)*(B3=Sheet1!$D$1:$D$2000),0))}
[E2] {=INDEX(Sheet1!B$1:B$2000,MATCH(1,(C2=Sheet1!$E$1:$E$2000)*(A2=Sheet1!$C$1:$C$2000)*(B3=Sheet1!$D$1:$D$2000),0))}
Due to duplicate max values, I can't just use a single array formula or just referring to the max values for MAX_PART_USG, I have to include the column A and B as well to find the exact match for Column D and E.
I was thinking is there a way to find the match for MAX values and at the same time pick up the values of the other fields on the same row? instead of doing the matching on column D and E. Any suggestions on how to do this? TIA.
Bookmarks