Hello,
I have found a VBA code on the Internet that deletes all red and size 1 characters within selected cells.
The code looks like this:
Could anybody help me change the code so that it adds a space if it deletes something in the middle of the cell (provided there's no space to the left or to the right of the deleted text)?
For example if you look at this picture:
asddf.png
After running the current code, A2 will look like A3. Sometimes I have spaces there, but the color of the space may be set to red and will be deleted too, so A1 might also look like A3 after running the code. In both cases I would like the code to add a space there so that the result would be "word1 word2 ".
Important information:
- the space that I would like to be added should have the same size as the character before the deleted part
- the formatting of the rest of the cell shouldn't be affected
Thank you very much in advance for your help.
Bookmarks