Home > Forum Home > Automating Data Analysis Tasks > Change text based on content Share

Change text based on content

Excel Help for Change Text Based On Content in Automating Data Analysis Tasks


Forum TopicPost Reply Login

Change Text Based On Content

Rate this:
(3/5 from 1 vote)
ConfusedHello, this is the first time I am using this forum so if I am off base please bear with me. I currently have a excel spreadsheet, in which I have over 2000 row entries. Each row entry has the exact same format which you can see below :

P - 815.280.2965 email - [email protected]
I would like to change every entry to read as follows:
[email protected]

I can change these manually, but with 2000 rows it would take a long time. There are 26 spaces before each email address. I believe I need to create a macro, but I am not sure.
Thank you for any help.
 Posted by on
 
Replies - Displaying 1 to 1 of 1Order Replies By: Most Recent | Chronological | Highest Rated
Confused
Rate this:
(3/5 from 1 vote)
You do not need a macro to do this. For illustration purposes lets assume that the column of data starts at cell B5.

If you want to completely replace the the text with the new one you can make a test using the FIND function:
=IF(ISERROR(FIND("[email protected]",B5,1)),B5,"[email protected]")

If you want to keep the first 26 characters and just replace the email address text, you can use the REPLACE function:
=REPLACE(B5,26,LEN(B5)-26,"[email protected]")
The formula can then be copied down for the rest of the rows to return the new text strings.


 Excel Business Forums Administrator
 Posted by on
 Displaying page 1 of 1 

Find relevant Excel templates and add-ins for Change text based on content in the