masking

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How can delete the first 6 charaters or numbers from the front end a a
string. I am sure this can be done with a macro, however I am unsure of the
code.(Example)
2145mm2356.110 jimmy joe bob I want to only extract the 2356.110 and place
it in an adoining cell or extract the first six charaters and put them in
another cell example 2145mm
 
You don't need a macro. Using string functions in the adjacent cells will
work.

In the following example, A1 holds the original string. B1 will be the
string with the first six characters stripped away. C1 will contain the
first six characters.

A1: 2145mm2356.110
B1: =RIGHT(A1,LEN(A1)-6)
C1: =MID(A1,1,6)

--John
 
You don't need a macro:

=MID(A1,7,255)

should do the trick.

But your example isn't just removing the 1st 6 characters. Somehow the " jimmy
joe bob" got lost.

You can also use Data/Text to columns, specifying fixed width and placing the
column boundary between the 6th and 7th characters.
 
Back
Top