Selecting specific text

S

shade77777

I have a list on an excel sheet that I need to clean up. I only have to move the first five characters from one cell and I want excell to automaticaly move them to a diffrent cell. Can this be done? Or can Excell Highlight only the first five characters and I can cut and paste

I have a list of 1000 cells that I need to sepeart. I do not want to do it manually because it takes forever. I need to find out if there is a way for excel to move these for me from colum B to Colum A

Colum a Colum B (These I separted mannully
404064 HLMP6400-011 YEL SM
404065 HLMP6500-011 GRN SM
414938 HSMP-3800
417456 1N533

ORingal in colum B (the numbers and letters are in the same cell
419639 SMS3991-30 RF DETECTO
426031 TR BCW31 NPN 100MA SOT-2
430462 TL062CD DUAL OP.AMP SO-
430471 TL071CD OP.AMP SO-
430601 MAR1-SM AMPLIFIER 1GH
430603 ERA-3SM MMIC AMPLIFIE
430612 RF2612 IF AMPLIFIER SOP2
432114 REGUL LM78L05ACM 0.1A SO
432115 REGUL 78L15ACM 0.1A SO-
432139 REGUL 78SR105HC +5V HORI

Please let me know. My emai is [email protected]
 
D

Don Guillett

You said 5 when you probably meant 6. But I used the requested 5 so you may
want to change 5 below to 6. and adjust "N" to your column "B"

Sub separateem()
x = Cells(Rows.Count, "n").End(xlUp).Row
For Each c In Range(Cells(1, "n"), Cells(x, "n"))
c.Offset(, -1) = Left(c, 5)
c.Value = Right(c, Len(c) - 7)
Next
End Sub
--
Don Guillett
SalesAid Software
[email protected]
shade77777 said:
I have a list on an excel sheet that I need to clean up. I only have to
move the first five characters from one cell and I want excell to
automaticaly move them to a diffrent cell. Can this be done? Or can Excell
Highlight only the first five characters and I can cut and paste?
I have a list of 1000 cells that I need to sepeart. I do not want to do it
manually because it takes forever. I need to find out if there is a way for
excel to move these for me from colum B to Colum A.
 
S

shade77777

Where would I put this? I am do not know excel that well.

Sub separateem(
x = Cells(Rows.Count, "n").End(xlUp).Ro
For Each c In Range(Cells(1, "n"), Cells(x, "n")
c.Offset(, -1) = Left(c, 5
c.Value = Right(c, Len(c) - 7
Nex
End Sub

Thank you for your help.
 
D

Don Guillett

This is not a formula. It is a macro. Therefore it goes into a macro module
and may be executed in several ways.
easiest is alt F8>this workbook>find it>double click
or
assign to a button from the forms toolbar.
 
Top