This code allows me to copy a formatted string in a cell and put it in a new cell preserving the format (including bold and colored text).
For example: "The bull was seeing red."
If I try to replace something I lose the string formatting (bold and colored text).
Is there a way to do a replace while preserving the formatting that will work for large strings (larger than 255 characters)? I'd also be open to seeing a better copy solution if anyone has one.
For example: "The bull was seeing red."
VBA Code:
Application.CutCopyMode = False
ActiveCell.Copy
Sheets("Sheet1").Select
Range("A2").Select
ActiveSheet.Paste
If I try to replace something I lose the string formatting (bold and colored text).
VBA Code:
Range("A2").Value = Replace(Range("A2").Value, Find:="was", Replace:="is")
Is there a way to do a replace while preserving the formatting that will work for large strings (larger than 255 characters)? I'd also be open to seeing a better copy solution if anyone has one.