Forum Discussion
Recording script in Excel; formula not dragging down, only values
- acklenkFeb 14, 2024Copper Contributor
Each row has a different email address and correct, I want a portion of the email address to be removed and replaced with x's for privacy reasons, however when I run the script it fills every single row with the concealed email address from the first row. Does that make sense? JKPieterse
- JKPieterseFeb 15, 2024Silver Contributor
acklenk What you would need to do is add a new column which contains a formula that changes the email address to how you want it to look. Suppose the current email address is in cell E2, that formula could be something like this:
="xxx.xxxxxx@"&TEXTAFTER(E2,"@")Then once the formula is as you want it, record a script where you edit that formula cell so you can see its syntax and add this to your current script.
- acklenkFeb 17, 2024Copper Contributor
JKPieterse Thanks! I think I did what you were saying, but I just had to bring the full emails into the new tab, create a new column to process the formula and then copy modified cells, paste as values over actual email address and then delete the column with the formula. A ton of extra steps but it seems to work this way.