Xlambda
Well-known Member
- Joined
- Mar 8, 2021
- Messages
- 860
- Office Version
- 365
- Platform
- Windows
AREVERSE array reverse, calls ATEXTJOIN. Other lambda in minisheet AKEEP
For a single cell there is a simple recursion lambda, but for an array I choose a non recursive one.
!! recursive !! T_REVERSE(w)=LAMBDA(w,LET(n,LEN(w),r,RIGHT(w,1),IF(n=0,w,r&T_REVERSE(LEFT(w,n-1)))))
For a single cell there is a simple recursion lambda, but for an array I choose a non recursive one.
!! recursive !! T_REVERSE(w)=LAMBDA(w,LET(n,LEN(w),r,RIGHT(w,1),IF(n=0,w,r&T_REVERSE(LEFT(w,n-1)))))
Excel Formula:
=LAMBDA(a,
LET(r,ROWS(a),c,MAX(LEN(a)),s,SEQUENCE(,c),m,MID(a,s,1),
ATEXTJOIN(INDEX(m,SEQUENCE(r),ABS(s-c-1)),,,)
)
)
LAMBDA 7.0.xlsx | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | J | K | |||
1 | check palindrome sentences | =AKEEP(A2:A5,T_CHARS(,2,),) | =AREVERSE(B2#) | =B2#=D2# | |||||||||
2 | Murder for a jar of red rum | Murderforajarofredrum | murderforajarofredruM | TRUE | |||||||||
3 | Borrow or rob? | Borroworrob | borroworroB | TRUE | |||||||||
4 | Eva, can I see bees in a cave? | EvacanIseebeesinacave | evacaniseebeesInacavE | TRUE | |||||||||
5 | Yo, banana boy! | Yobananaboy | yobananaboY | TRUE | |||||||||
6 | |||||||||||||
7 | is palindrome | =AREVERSE(B8:B13) | =B8:B13=D8# | =PROPER(LOWER(T_REVERSE(B8))) | |||||||||
8 | Gigi | igiG | FALSE | Igig | |||||||||
9 | 1234abcdefg | gfedcba4321 | FALSE | Gfedcba4321 | |||||||||
10 | Madam | madaM | TRUE | Madam | |||||||||
11 | Civic | civiC | TRUE | Civic | |||||||||
12 | Level | leveL | TRUE | Level | |||||||||
13 | Radar | radaR | TRUE | Radar | |||||||||
14 | |||||||||||||
15 | for a single cell recursive lambda | ||||||||||||
16 | T_REVERSE(w)=LAMBDA(w,LET(n,LEN(w),r,RIGHT(w,1),IF(n=0,w,r&T_REVERSE(LEFT(w,n-1))))) | ||||||||||||
17 | |||||||||||||
18 | other lambdas used | ||||||||||||
19 | AKEEP | ||||||||||||
20 | |||||||||||||
AREVERSE post |
Cell Formulas | ||
---|---|---|
Range | Formula | |
B1,F7,D7,H7,F1,D1 | B1 | =FORMULATEXT(B2) |
B2:B5 | B2 | =AKEEP(A2:A5,T_CHARS(,2,),) |
D2:D5 | D2 | =AREVERSE(B2#) |
F2:F5 | F2 | =B2#=D2# |
D8:D13 | D8 | =AREVERSE(B8:B13) |
F8:F13 | F8 | =B8:B13=D8# |
H8:H13 | H8 | =PROPER(LOWER(T_REVERSE(B8))) |
Dynamic array formulas. |
Upvote
0