Xlambda
Well-known Member
- Joined
- Mar 8, 2021
- Messages
- 837
- Office Version
- 365
- Platform
- Windows
ASELECT array select, selects a region of an array between 2 rows, 2 columns, can append extra columns
Excel Formula:
=LAMBDA(a,rm,rx,cm,cx,ec,
LET(r,ROWS(a),c,COLUMNS(a),sr,SEQUENCE(r),sc,SEQUENCE(,c),
v,IFNA(XMATCH(rm,sr),1),w,IFNA(XMATCH(rx,sr),r),rp,(sr>=MIN(v,w))*(sr<=MAX(v,w)),
x,IFNA(XMATCH(cm,sc),1),y,IFNA(XMATCH(cx,sc),c),cp,(sc>=MIN(x,y))*(sc<=MAX(x,y)),
z,ISNUMBER(XMATCH(sc,ec)),
FILTER(FILTER(a,IF(AND(AND(cp),OR(z)),cp*z,cp+z)),rp)
)
)
LAMBDA 7.0.xlsx | |||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | |||
1 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | ||||
2 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | ||||
3 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | ||||
4 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | ||||
5 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | ||||
6 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | ||||
7 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | ||||
8 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | ||||
9 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | ||||
10 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | ||||
11 | |||||||||||||||||||
12 | =ASELECT(A1#,6,9,5,7,{11,12}) | =ASELECT(A1#,,4,4,7,{15,13}) | =ASELECT(A1#,,,,,{8,10}) | ||||||||||||||||
13 | 80 | 81 | 82 | 86 | 87 | 4 | 5 | 6 | 7 | 13 | 15 | 8 | 10 | ||||||
14 | 95 | 96 | 97 | 101 | 102 | 19 | 20 | 21 | 22 | 28 | 30 | 23 | 25 | ||||||
15 | 110 | 111 | 112 | 116 | 117 | 34 | 35 | 36 | 37 | 43 | 45 | 38 | 40 | ||||||
16 | 125 | 126 | 127 | 131 | 132 | 49 | 50 | 51 | 52 | 58 | 60 | 53 | 55 | ||||||
17 | =ASELECT(A1#,7,,13,,{2,4}) | =ASELECT(A1#,,3,,3,) | 68 | 70 | |||||||||||||||
18 | 92 | 94 | 103 | 104 | 105 | 1 | 2 | 3 | 83 | 85 | |||||||||
19 | 107 | 109 | 118 | 119 | 120 | 16 | 17 | 18 | 98 | 100 | |||||||||
20 | 122 | 124 | 133 | 134 | 135 | 31 | 32 | 33 | 113 | 115 | |||||||||
21 | 137 | 139 | 148 | 149 | 150 | 128 | 130 | ||||||||||||
22 | 143 | 145 | |||||||||||||||||
23 | |||||||||||||||||||
ASELECT post |
Cell Formulas | ||
---|---|---|
Range | Formula | |
A1:O10 | A1 | =SEQUENCE(10,15) |
A12,G17,A17,N12,G12 | A12 | =FORMULATEXT(A13) |
A13:E16 | A13 | =ASELECT(A1#,6,9,5,7,{11,12}) |
G13:L16 | G13 | =ASELECT(A1#,,4,4,7,{15,13}) |
N13:O22 | N13 | =ASELECT(A1#,,,,,{8,10}) |
A18:E21 | A18 | =ASELECT(A1#,7,,13,,{2,4}) |
G18:I20 | G18 | =ASELECT(A1#,,3,,3,) |
Dynamic array formulas. |
Upvote
0