First 6 characters in column

  • Thread starter Thread starter thriftwayerics
  • Start date Start date
T

thriftwayerics

I have a data that I'm importing into excel that looks similar to:
123456 012. What I want to do is on this whole column trim everything
away and leave only the first 6 characters. Is this something fairly
simple?

Thanks
 
You could use the Text to Columns feature:

Select the cells that contain the numbers.
Choose Data>Text to Columns
Select Fixed Width, click Next
In the Data Preview window, click after the sixth character,
to add a break line.
Click Next
With the first column selected, choose
'Do not import column (skip)'
Click Finish
 
You could use the function =LEFT(A1,6) in an adjacent column and then paste
the values back over the original data
 
try

Sub leftxis()
For Each c In Range("c1:c200")
c.Value = Left(c, 6)
Next

End Sub
 

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

Back
Top