Find and replace

G

Guest

got a file in one column is vehicle descriptions and there are note codes in
the description (Reg. Cab2) the #2 is the note. but In the file I have the #2
at the end of the work Cab is smaller and elevated. is there any way to
single out the small elevated numbers so I can do a find and replace to make
it say Reg. Cab (code 2)
the number is not always a 2 it can be any number. So i need a formula that
will grab any smaller elevated number and put the word code in front of it.
Some of the descriptions contain numbers that are standard size so I can't
just do a number search.
S-series/GMC Sonoma - Reg. Cab2
C/K Pickup - Ext. Cab, 2 door3 (incl. Z71)
Silverado/GMC Sierra 1500/2500LD- Ext. Cab, 3 DR8
 
M

mrice

Jason

The following user defined formula may help.

Function DetectSuperscript(Cell As Range)
For N = 1 To Len(Cell)
If Cell.Characters(Start:=N, Length:=1).Font.Superscript = True
Then
DetectSuperscript = Cell.Characters(Start:=N,
Length:=1).Text
Exit Function
End If
Next N
End Function

This will give you back the superscript character which you can then
use to reassemble your text string.

My email in on my homepage if you need a bit of extra help.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top