I have a large spreadsheet with a column called "Roles". In this columns are values like:
ROLES
Author
Author;
Publishing; Author;
Something Else; Author; Publishing
There are other columns where the word "Author" may exist.
What I need to do is look for "Author" in my "Roles" column only, and replace it with "Authoring", without losing anything before or after it. i.e. the end result should be:
ROLES
Authoring
Authoring;
Publishing; Authoring;
Something Else; Authoring; Publishing
I tried the FIND
- and REPLACE
-functions, but that replaced the entire cell value, not just a portion of it.
=IF(FIND("Author",[@Roles],1),REPLACE("Author",1,6,"Authoring"))
Can anyone help? I'd rather not us a VB solution, as I'm not familiar with how to do that, so hopefully there is a formula based way?
The Excel REPLACE function replaces characters specified by location in a given text string with another text string. For example =REPLACE("XYZ123",4,3,"456") returns "XYZ456". The altered text. old_text - The text to replace.
To replace or substitute all occurrences of one character with another character, you can use the substitute function. The SUBSTITUTE function is full automatic. All you need to do is supply "old text" and "new text". SUBSTITUTE will replace every instance of the old text with the new text.
what you're looking for is SUBSTITUTE:
=SUBSTITUTE(A2,"Author","Authoring")
Will substitute Author for Authoring without messing with everything else
What you need to do is as follows:
That's it!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With