SEDOLs: Difference between revisions
Content added Content deleted
m (→Excel LAMBDA) |
m (→Excel LAMBDA) |
||
Line 1,199: | Line 1,199: | ||
{{Works with|Office 365 Betas 2021}} |
{{Works with|Office 365 Betas 2021}} |
||
<lang lisp> |
<lang lisp>=LAMBDA(s, |
||
IF(6 = LEN(s), |
|||
=LAMBDA(s, |
|||
LET( |
LET( |
||
cs, MID(s, SEQUENCE(1, 6, 1, 1), 1), |
|||
isVowel, LAMBDA(c, |
|||
ELEM(c)({"A","E","I","O","U"}) |
|||
), |
|||
sedolValue, LAMBDA(c, |
|||
LET( |
|||
), |
ic, CODE(c), |
||
IF(65 > ic, |
|||
ic - 48, |
|||
ic |
(ic + 10) - 65 |
||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
SUM( |
|||
MUL({1,3,1,7,3,9})( |
|||
sedolValue(cs) |
|||
) |
|||
), 10 |
|||
⚫ | |||
) |
) |
||
) |
) |
||
), |
), |
||
IF(OR(isVowel(cs)), |
|||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
"Expected a 6-character SEDOL" |
|||
) |
) |
||
)</lang> |
)</lang> |