Realtreegirl75
New Member
- Joined
- Aug 28, 2022
- Messages
- 31
- Office Version
- 365
- Platform
- Windows
There is a cell in Excel that I need to type 22E113. This autoformats to 2.20E+114 but I need it to stay the same. I know I can type a ' in front of it each time but I will be distributing this sheet to people who will not remember that lol. Is there a way to write code into the worksheet that will add the ' in front of it each time so that it will stay the same as what anyone is typing in? I found this code on another site that kind of works but doesn't stop the text from autoformatting. I've tried to tweak it but I'm not having much luck...Any help would be so appreciated!!
Sub AppendToExistingOnLeft()
Dim c As Range
For Each c In Selection
If c.Value <> "" Then c.Value = "CN- " & c.Value
Next
End Sub
Sub AppendToExistingOnLeft()
Dim c As Range
For Each c In Selection
If c.Value <> "" Then c.Value = "CN- " & c.Value
Next
End Sub