Hi, I'm trying to replace a FILTER function on this Excel file which run on Excel 365 to an older version of Excel 2016. The goal is to list down products to be sourced to potential customers, either based on quantity (sorted either highest to lowest or vice versa) or by distance (nearest to furthest or vice versa). Tried to browse through several threads with no luck and given my limited Excel competency, I'm hoping anyone can be of assistance to shed some light on this. Any ideas are greatly appreciated.
DATA_BARU_TKI.xlsx | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | J | K | L | |||
2 | 1 | 2 | 3 | 4 | Base | Distance | ||||||||
3 | Product | Qty | Customer | Distance | Column No. | 4 | ||||||||
4 | CR3Y98957 | 4 | PT A | 10 | Sort | Descend | -1 | |||||||
5 | CR3Y98963 | 7 | PT BRM | 15 | ||||||||||
6 | CR3Y98957 | 8 | PT C | 6 | Product | Customer 1 | Customer 2 | Customer 3 | Customer 4 | Customer 5 | ||||
7 | CR3Y98957 | 10 | PT D | 4 | CR3Y98957 | PT A | PT ASDQWE | PT B | PT C | PT D | ||||
8 | CR3Y98958 | 6 | PT X | 10 | CR3Y98963 | PT MIB | PT BRM | |||||||
9 | CR3Y98958 | 12 | PT Y | 2 | CR3Y98958 | PT X | PT Y | PT Z | ||||||
10 | CR3Y98958 | 7 | PT Z | 1 | CR3Y98960 | PT ABC | PT DEF | PT GHI | PT RST | PT TUV | ||||
11 | CR3Y98960 | 20 | PT ABC | 50 | CR3Y98962 | PT ASDQWE | ||||||||
12 | CR3Y98960 | 15 | PT DEF | 40 | ||||||||||
13 | CR3Y98960 | 13 | PT GHI | 30 | ||||||||||
14 | CR3Y98960 | 12 | PT RST | 20 | ||||||||||
15 | CR3Y98960 | 10 | PT TUV | 10 | ||||||||||
16 | CR3Y98962 | 100 | PT ASDQWE | 50 | ||||||||||
17 | CR3Y98957 | 6 | PT B | 8 | ||||||||||
18 | CR3Y98963 | 8 | PT MIB | 20 | ||||||||||
19 | CR3Y98957 | 20 | PT ASDQWE | 10 | ||||||||||
Test |
Cell Formulas | ||
---|---|---|
Range | Formula | |
B2:D2 | B2 | =A2+1 |
H3 | H3 | =IF(H2="Distance",$D$2,$B$2) |
I4 | I4 | =IF(H4="Ascend",1,-1) |
G7:G11 | G7 | =UNIQUE(FILTER(A4:A96,A4:A96<>"")) |
H7:L7,H12:CG13,H11,H10:L10,H9:J9,H8:I8 | H7 | =IF(IFNA(TRANSPOSE(INDEX(SORT(SORTBY(FILTER($A$4:$D$97,$A$4:$A$97=$G7), INDEX(FILTER($A$4:$D$97,$A$4:$A$97=$G7),0,3),1, INDEX(FILTER($A$4:$D$97,$A$4:$A$97=$G7),0,2),1),$H$3,$I$4),0,3)),"Check data")=0,"",IFNA(TRANSPOSE(INDEX(SORT(SORTBY(FILTER($A$4:$D$97,$A$4:$A$97=$G7), INDEX(FILTER($A$4:$D$97,$A$4:$A$97=$G7),0,3),1, INDEX(FILTER($A$4:$D$97,$A$4:$A$97=$G7),0,2),1),$H$3,$I$4),0,3)),"Check data")) |
Dynamic array formulas. |
Cells with Data Validation | ||
---|---|---|
Cell | Allow | Criteria |
H2 | List | =Reference!$A$4:$A$5 |
H4 | List | =Reference!$B$4:$B$5 |