Xlambda
Well-known Member
- Joined
- Mar 8, 2021
- Messages
- 860
- Office Version
- 365
- Platform
- Windows
T_AFA !! recursive !! Tool Advanced Filter boolean Adding (OR), creates pattern array, like "include" argument found in FILTER function of any array, for explicit criteria or comparative arguments.
Main function used is countifs and not filter, because it can handle explicit comparative arguments.
Can be used inside FILTER function as "include" argument or with ADVFLT (AdvancedFilter) function.
Main function used is countifs and not filter, because it can handle explicit comparative arguments.
Can be used inside FILTER function as "include" argument or with ADVFLT (AdvancedFilter) function.
Excel Formula:
=LAMBDA(a,cl,cr,p,
LET(n,COLUMNS(cl),x,INDEX(cl,n),y,INDEX(cr,n),z,INDEX(a,,x),
IF(n=1,p+(COUNTIFS(z,z,z,y)>0),p+T_AFA(a,INDEX(cl,SEQUENCE(,n-1)),INDEX(cr,SEQUENCE(,n-1)),COUNTIFS(z,z,z,y)>0))
)
)
LAMBDA 7.0.xlsx | |||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | |||
1 | 01-01-20 | Tynia Malone | 500 | Quad | MidWest | 12560.88 | product="Quad" or region="West" | product="Quad" or region contains "West" | |||||||||||||||||||
2 | 01-01-20 | Kiki Sho | 38 | Yanaki | MidWest | 902.79 | =T_AFA(A1:F32,{5,4},{"west","quad"},) | =T_AFA(A1:F32,{4,5},{"quad","*west"},0) | |||||||||||||||||||
3 | 01-01-20 | Hien Pham | 500 | Yanaki | MidWest | 8035.63 | 1 | 2 | |||||||||||||||||||
4 | 01-01-20 | Chantel Mims | 500 | Yanaki | West | 8035.63 | 0 | =FILTER(A1:F32,H3#) | 1 | =FILTER(A1:F32,Q3#) | |||||||||||||||||
5 | 01-01-20 | Tynia Malone | 39 | Quad | East | 1481.47 | 0 | 01-01-20 | Tynia Malone | 500 | Quad | MidWest | 12560.88 | 1 | 01-01-20 | Tynia Malone | 500 | Quad | MidWest | 12560.88 | |||||||
6 | 01-01-20 | Kiki Sho | 48 | Sunset | MidWest | 934.2 | 1 | 01-01-20 | Chantel Mims | 500 | Yanaki | West | 8035.63 | 1 | 01-01-20 | Kiki Sho | 38 | Yanaki | MidWest | 902.79 | |||||||
7 | 01-01-20 | Hien Pham | 13 | Quad | Canada | 580.97 | 1 | 01-01-20 | Tynia Malone | 39 | Quad | East | 1481.47 | 1 | 01-01-20 | Hien Pham | 500 | Yanaki | MidWest | 8035.63 | |||||||
8 | 02-01-20 | Tynia Malone | 27 | Yanaki | NorthWest | 641.45 | 0 | 01-01-20 | Hien Pham | 13 | Quad | Canada | 580.97 | 1 | 01-01-20 | Chantel Mims | 500 | Yanaki | West | 8035.63 | |||||||
9 | 02-01-20 | Hien Pham | 13 | Sunset | MidWest | 337.35 | 1 | 02-01-20 | Tynia Malone | 44 | Quad | South | 1596.61 | 1 | 01-01-20 | Tynia Malone | 39 | Quad | East | 1481.47 | |||||||
10 | 02-01-20 | Chantel Mims | 36 | Sunset | MidWest | 732.87 | 0 | 03-01-20 | Chantel Mims | 37 | Quad | Mexico | 1374.05 | 1 | 01-01-20 | Kiki Sho | 48 | Sunset | MidWest | 934.2 | |||||||
11 | 02-01-20 | Tynia Malone | 44 | Quad | South | 1596.61 | 0 | 03-01-20 | Janis Figueroa | 525 | Quad | Mexico | 13188.92 | 1 | 01-01-20 | Hien Pham | 13 | Quad | Canada | 580.97 | |||||||
12 | 03-01-20 | Hien Pham | 100 | Crested Beaut | MidWest | 1816.5 | 0 | 04-01-20 | Tynia Malone | 3 | Sunset | West | 74.85 | 1 | 02-01-20 | Tynia Malone | 27 | Yanaki | NorthWest | 641.45 | |||||||
13 | 03-01-20 | Chantel Mims | 7 | Yanaki | Mexico | 188.65 | 1 | 04-01-20 | Chantel Mims | 48 | Crested Beaut | West | 934.2 | 1 | 02-01-20 | Hien Pham | 13 | Sunset | MidWest | 337.35 | |||||||
14 | 03-01-20 | Hien Pham | 5 | Yanaki | Mexico | 139.75 | 0 | 04-01-20 | Kiki Sho | 25 | Quad | Mexico | 907.16 | 1 | 02-01-20 | Chantel Mims | 36 | Sunset | MidWest | 732.87 | |||||||
15 | 03-01-20 | Chantel Mims | 37 | Quad | Mexico | 1374.05 | 0 | 04-01-20 | Chantel Mims | 275 | Yanaki | West | 4419.59 | 0 | 02-01-20 | Tynia Malone | 44 | Quad | South | 1596.61 | |||||||
16 | 03-01-20 | Janis Figueroa | 525 | Quad | Mexico | 13188.92 | 0 | 05-01-20 | Chantel Mims | 200 | Quad | East | 5976.6 | 0 | 03-01-20 | Hien Pham | 100 | Crested Beaut | MidWest | 1816.5 | |||||||
17 | 03-01-20 | Chantel Mims | 450 | Sunset | NorthWest | 6714.56 | 1 | 05-01-20 | Chantel Mims | 28 | Quad | MidWest | 1039.82 | 1 | 03-01-20 | Chantel Mims | 37 | Quad | Mexico | 1374.05 | |||||||
18 | 04-01-20 | Hien Pham | 45 | Sunset | Canada | 916.09 | 1 | 1 | 03-01-20 | Janis Figueroa | 525 | Quad | Mexico | 13188.92 | |||||||||||||
19 | 04-01-20 | Tynia Malone | 3 | Sunset | West | 74.85 | 0 | 1 | 03-01-20 | Chantel Mims | 450 | Sunset | NorthWest | 6714.56 | |||||||||||||
20 | 04-01-20 | Chantel Mims | 48 | Crested Beaut | West | 934.2 | 0 | 0 | 04-01-20 | Tynia Malone | 3 | Sunset | West | 74.85 | |||||||||||||
21 | 04-01-20 | Chantel Mims | 100 | Crested Beaut | MidWest | 1746.5 | 1 | 1 | 04-01-20 | Chantel Mims | 48 | Crested Beaut | West | 934.2 | |||||||||||||
22 | 04-01-20 | Hien Pham | 2 | Yanaki | South | 55.9 | 1 | 1 | 04-01-20 | Chantel Mims | 100 | Crested Beaut | MidWest | 1746.5 | |||||||||||||
23 | 04-01-20 | Kiki Sho | 25 | Quad | Mexico | 907.16 | 0 | 1 | 04-01-20 | Kiki Sho | 25 | Quad | Mexico | 907.16 | |||||||||||||
24 | 04-01-20 | Chantel Mims | 8 | Crested Beaut | South | 215.6 | 0 | 0 | 04-01-20 | Kiki Sho | 34 | Crested Beaut | MidWest | 778.86 | |||||||||||||
25 | 04-01-20 | Kiki Sho | 34 | Crested Beaut | MidWest | 778.86 | 1 | 1 | 04-01-20 | Chantel Mims | 275 | Yanaki | West | 4419.59 | |||||||||||||
26 | 04-01-20 | Chantel Mims | 275 | Yanaki | West | 4419.59 | 0 | 0 | 05-01-20 | Chantel Mims | 200 | Quad | East | 5976.6 | |||||||||||||
27 | 05-01-20 | Chantel Mims | 200 | Quad | East | 5976.6 | 0 | 1 | 05-01-20 | Janis Figueroa | 36 | Majestic Beaut | MidWest | 1069.47 | |||||||||||||
28 | 05-01-20 | Hien Pham | 600 | Yanaki | East | 9297.75 | 1 | 1 | 05-01-20 | Chantel Mims | 28 | Quad | MidWest | 1039.82 | |||||||||||||
29 | 05-01-20 | Janis Figueroa | 36 | Majestic Beaut | MidWest | 1069.47 | 1 | 1 | 05-01-20 | Kiki Sho | 525 | Yanaki | MidWest | 8437.41 | |||||||||||||
30 | 05-01-20 | Chantel Mims | 28 | Quad | MidWest | 1039.82 | 0 | 0 | |||||||||||||||||||
31 | 05-01-20 | Kiki Sho | 525 | Yanaki | MidWest | 8437.41 | 0 | 1 | |||||||||||||||||||
32 | 05-01-20 | Chantel Mims | 6 | Majestic Beaut | Canada | 209.7 | 1 | 2 | |||||||||||||||||||
33 | 0 | 1 | |||||||||||||||||||||||||
34 | 0 | 0 | |||||||||||||||||||||||||
35 | |||||||||||||||||||||||||||
T_AFA post |
Cell Formulas | ||
---|---|---|
Range | Formula | |
H2,S4,J4,Q2 | H2 | =FORMULATEXT(H3) |
H3:H34 | H3 | =T_AFA(A1:F32,{5,4},{"west","quad"},) |
Q3:Q34 | Q3 | =T_AFA(A1:F32,{4,5},{"quad","*west"},0) |
J5:O17 | J5 | =FILTER(A1:F32,H3#) |
S5:X29 | S5 | =FILTER(A1:F32,Q3#) |
Dynamic array formulas. |
Upvote
0