Xlambda
Well-known Member
- Joined
- Mar 8, 2021
- Messages
- 860
- Office Version
- 365
- Platform
- Windows
ALMERGE arrays Left Merge, same functionality as in Power Querry join/merge scenario called Left Anti. Calls ATEXTJOIN
Other functions used on minisheet ARRANGE , AIJOIN
Other functions used on minisheet ARRANGE , AIJOIN
Excel Formula:
=LAMBDA(l,r,klf,krt,
LET(d,"|",t,"not found",kl,UNIQUE(IF(klf=0,1,klf),1),kr,UNIQUE(IF(krt=0,1,krt),1),
cl,COLUMNS(l),ql,SEQUENCE(,cl),cr,COLUMNS(r),qr,SEQUENCE(,cr),rl,ROWS(l),sl,SEQUENCE(rl),rr,ROWS(r),sr,SEQUENCE(rr),
a,INDEX(l,sl,kl),b,INDEX(r,sr,kr),ta,ATEXTJOIN(a,,,d),tb,ATEXTJOIN(b,,,d),
x,XMATCH(ta,tb),xn,ISNUMBER(x),ia,FILTER(sl,NOT(xn),t),al,INDEX(l,ia,ql),
ml,OR(ISNA(XMATCH(kl,ql))),mr,OR(ISNA(XMATCH(kr,qr))),
IFS(OR(ml,mr),"check keys",ia=t,t,TRUE,al)
)
)
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 | |||
1 | PQ name: Left Anti (Only in left array) | array 1 | array 2 | find names only in left array | |||||||||||||||||||
2 | Units | Color | Product | Code | Product | Price | Color | =ALMERGE(A3:C14,E3:H10,{3,2},{2,4}) | Sol Marroquin | Raven Beatty | =ALMERGE(O2:O13,Q2:Q13,,) | ||||||||||||
3 | 48 | Red | Quad | CR-r | Carlota | 26 | Red | 132 | Blue | Carlota | Kiera Mcfall | Roxanna Mercier | Sol Marroquin | ||||||||||
4 | 156 | Blue | Quad | KK-b | Kiki | 13 | Blue | 72 | Blue | Carlota | Raven Beatty | Fanny Denning | Kiera Mcfall | ||||||||||
5 | 168 | Red | Quad | QD-r | Quad | 43 | Red | 96 | Red | Gigi | Elinore Dees | Lesha Nobles | Elinore Dees | ||||||||||
6 | 132 | Blue | Carlota | SH-r | Sunshine | 19 | Red | 120 | Blue | Carlota | Wei Lockwood | Wei Lockwood | Donald Eldridge | ||||||||||
7 | 72 | Blue | Carlota | CR-g | Carlota | 24 | Green | left to right | Donald Eldridge | Gertrudis Fitzpatrick | Claudio Beam | ||||||||||||
8 | 108 | Red | Sunshine | QD-b | Quad | 41 | Blue | =ALMERGE(A3:C14,E3:H10,3,2) | Claudio Beam | Angelita Packer | Reyna Luke | ||||||||||||
9 | 128 | Blue | Quad | SH-b | Sunshine | 18 | Blue | 96 | Red | Gigi | Angelita Packer | Beaulah Wenger | Vivan Keeney | ||||||||||
10 | 96 | Red | Gigi | KK-r | Kiki | 20 | Red | Reyna Luke | Malvina Hamer | (if we invert right and left arrays) | |||||||||||||
11 | 60 | Red | Sunshine | error debug. | Beaulah Wenger | Bernita Crutcher | PQ name: Right Anti (Only in right array) | ||||||||||||||||
12 | 24 | Blue | Sunshine | =ALMERGE(E3:H10,A3:C14,{2,4},{3,2}) | =ALMERGE(A3:C14,E3:H10,2,5) | Malvina Hamer | Shiela Anaya | find names only in right array | |||||||||||||||
13 | 120 | Blue | Carlota | CR-r | Carlota | 26 | Red | check keys | Vivan Keeney | Yolonda Armstead | =ALMERGE(Q2:Q13,O2:O13,,) | ||||||||||||
14 | 24 | Blue | Quad | KK-b | Kiki | 13 | Blue | Roxanna Mercier | |||||||||||||||
15 | CR-g | Carlota | 24 | Green | (key right column out of range) | Fanny Denning | |||||||||||||||||
16 | KK-r | Kiki | 20 | Red | Lesha Nobles | ||||||||||||||||||
17 | right to left | Gertrudis Fitzpatrick | |||||||||||||||||||||
18 | PQ name: Right Anti (Only in right array) | =ALMERGE(A3:C14,E3:H10,2,4) | Bernita Crutcher | ||||||||||||||||||||
19 | not found | Shiela Anaya | |||||||||||||||||||||
20 | Yolonda Armstead | ||||||||||||||||||||||
21 | (keys in range but | ||||||||||||||||||||||
22 | no data only in left array) | PQ name: Inner Join | |||||||||||||||||||||
23 | find common names in both arrays | ||||||||||||||||||||||
24 | =ARRANGE(J3#,{3,2}) | =AIJOIN(O2:O13,Q2:Q13,,) | |||||||||||||||||||||
25 | Carlota | Blue | 132 | Raven Beatty | |||||||||||||||||||
26 | Carlota | Blue | 72 | Wei Lockwood | |||||||||||||||||||
27 | Gigi | Red | 96 | Angelita Packer | |||||||||||||||||||
28 | Carlota | Blue | 120 | Beaulah Wenger | |||||||||||||||||||
29 | Malvina Hamer | ||||||||||||||||||||||
30 | other functions used on minisheet | ||||||||||||||||||||||
31 | ARRANGE | ||||||||||||||||||||||
32 | AIJOIN | ||||||||||||||||||||||
ALMERGE post |
Cell Formulas | ||
---|---|---|
Range | Formula | |
J2,S24,J24,J18,S13,E12,J12,J8,S2 | J2 | =FORMULATEXT(J3) |
J3:L6 | J3 | =ALMERGE(A3:C14,E3:H10,{3,2},{2,4}) |
S3:S9 | S3 | =ALMERGE(O2:O13,Q2:Q13,,) |
J9:L9 | J9 | =ALMERGE(A3:C14,E3:H10,3,2) |
E13:H16 | E13 | =ALMERGE(E3:H10,A3:C14,{2,4},{3,2}) |
J13 | J13 | =ALMERGE(A3:C14,E3:H10,2,5) |
S14:S20 | S14 | =ALMERGE(Q2:Q13,O2:O13,,) |
J19 | J19 | =ALMERGE(A3:C14,E3:H10,2,4) |
J25:L28 | J25 | =ARRANGE(J3#,{3,2}) |
S25:S29 | S25 | =AIJOIN(O2:O13,Q2:Q13,,) |
Dynamic array formulas. |
Upvote
0