Dazzawm
Well-known Member
- Joined
- Jan 24, 2011
- Messages
- 3,786
- Office Version
- 365
- Platform
- Windows
I was given the code below to add a prefix from an input box, but it doesnt seem to work if I try adding letters to the front of numbers?
Code:
Sub AddPrefix()
Dim c As Range, s As String
s = InputBox("Enter Prefix")
If s = "" Then Exit Sub
For Each c In Selection.SpecialCells(xlConstants, xlTextValues)
c.Value = s & c.Value
Next c
End Sub