This depends how the text and underscores are set on the sheet. Are the text and underscores in the same cell? Or is it text in a cell, underscores in a cell next to it?
If they are separate find and replace is likely the quick and easy...if the underscores are alone in their own cell
You may also be able to use find and replace. Something like:
Find: *_*
With: ________
However if there is text and underscores mixed, then you will likely want to look at a formula to do it. The example given above would combine text without underscores with the desired number of underscores...it wont fix things for you if there is text and underscores mixed in a cell already.
For that you may want to look at the SUBSTITUTE function. You may also combine something like LEFT/RIGHT/MID with FIND and CONCATENATE. Is the underscoring always at the end of a sentence?
If its always at the end (assuming cell with text and underscore is in B3):
If underscoring could be anywhere in the string:
Not the most elegant formula, but gets the job done. Essentially I replace the first underscore with a character I know wont be in any string, I picked "*" but you can change to your liking. I then replace the other underscores with nothing. Lastly I replace my special character, "*", with 8 underscores. This would not affect text before/after the underscores in your string, but would also only work if there is one set of underscores in the string.
Ie: Works - "He went to the _____."
Doesnt work - "He went to the _____ and to the _______."
Hopefully this helps
Bookmarks