Eliminating a letter before numbers

C

Chris

Hello,
I have a column of numbers that has the letter T in front
of alot of numbers(not all) For instance there is T1 T14
and so forth in some but not all of the numbers. Others
just have regular numbers such as 5. How do I get rid of
the T? Also there is is a word called cut in other cells
in that column that I would like to assign a number to
such as 50.
Is there a worksheet unction or Macro that I could use.
Thank you

Chris
 
P

Peo Sjoblom

Why not use the built in edit>replace, find what T, replace with nothing.
Could explain a bit more about cut, do you want to replace it with 50 or
make it like cut50
 
K

Ken Wright

Select all the data and do Edit / replace / Replace what = Cut, Replace with =
50

Then

Select all the data and do Edit / replace / Replace what = T, Replace with =
nothing <leave blank>

If you don't do it in that order your CUT will become CU in each of the cells
that CUT is currently in. No real hardship as you can then do a replace on CU
with 50
 
C

Chris

No I would just like to insert the value of a number with
50. i agree that the edit repace might be the best thing
to do. Can I create a Macro for this actio? Either
repacing the T of the word Cut with 50?
Thanks

Chris
 
K

Ken Wright

Sub ReplaceT()

With Columns("A:A")
.Replace What:="Cut", Replacement:="50"
.Replace What:="T", Replacement:="", LookAt:=xlPart
End With

End Sub
 
P

Peo Sjoblom

Just record a macro while doing this, it would look something like

Sub ReplaceT()
Selection.Replace What:="T", Replacement:="", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
End Sub
 
G

Guest

If you're looking for a "function" solution, you can use this formula in a
2nd column:

=IF(ISNUMBER(A1),A1,IF(LEFT(A1)="t",VALUE(MID(A1,2,LEN(A1)-1)),IF(A1="cut",5
0)))

To create fixed values from the formula results, use:
Copy, Paste Special - Values

Good Luck,
Robert Zimmer
 
B

Bill Kuunders

edit / find and replace

find T and leave the replace with entry empty...
should work
it worked for me
regards
Bill K
 

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