Forum Discussion

seanconwayc's avatar
seanconwayc
Copper Contributor
Aug 28, 2025
Solved

Data Masking Emails using Formulae

Hi guys,  I am trying to work on my data masking skills and have ran into a problem. I am trying to mask the email addresses of the following data set (this is a fake set of data from an online cour...
  • m_tarler's avatar
    Aug 28, 2025

    It appears someone gave you a formula that does work but I cleaned up your version and theirs and made both dynamic arrays so they apply to the whole column at once:

    I think this is a variation on your original using REPLACE:

    =REPLACE(E2:.E99999,2,FIND("@",E2:.E99999)-3,REPT("*",FIND("@",E2:.E99999)-3))

    and a multi-segmented version:

    =LEFT(E2:.E99999,1) & REPT("*",FIND("@",E2:.E99999)-3) & MID(E2:.E99999,FIND("@",E2:.E99999)-1,LEN(E2:.E99999))

    and you could further refine them using LET.  For example:

    =LET(n,FIND("@",E2:.E99999)-3, REPLACE(E2:.E99999,2,n,REPT("*",n)))

     

Resources