Forum Discussion
4 Replies
Sort By
- PeterBartholomew1Silver 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])
- Riny_van_EekelenPlatinum Contributor
- Ntnk1999Copper Contributor
Riny_van_Eekelen
Thank you for your response.Alex Richards *****ards *********ards **** ****ards Alexis Rose *****rose *******rose ****** rose Samantha James *****ames **********ames ******** *ames Guiseppa De Santosh ******** ** ***tosh
i want this time of format.
please help me with the last entry- Riny_van_EekelenPlatinum Contributor
Ntnk1999Probably a terrible formula if you don't have MS365 or Excel 2021. But if you are on either of these or Excel on-line, try this one:
=TEXTJOIN("",,IF(MID(A1,SEQUENCE(LEN(A1)-4),1)=" ", " ","*"))&LOWER(RIGHT(A1,4))