Forum Discussion
PeterBartholomew1
Jun 30, 2022Silver Contributor
If you have the good fortune to be a 365 user, then the formula can be packaged somewhat differently.
Worksheet formula
= MAP(name, Maskλ)
Maskλ
= LAMBDA(n,
CONCAT(
LET(
k, SEQUENCE(LEN(n) - 4),
IF(MID(n, k, 1) <> " ", "*", " ")),
LOWER(RIGHT(n,4))
)
)where 'name' is the array of names to be masked, and 'Maskλ' is a Lambda function that replaces non-space characters by "*".
If the function is to be used in a Table then rather than a mapped array one would use
= Maskλ(Table1[@Name])