Cleaning Product Code list

  • Thread starter Thread starter mike meyer
  • Start date Start date
M

mike meyer

I have some product codes in a column:

123-1
123-3
1406-3
1508-6
154-8
117-5
8957-5
8957-6

I need to extract the main product code left of the dash into the next
column.
I know I have seen this done, just don't remember how it was accomplished.

Thanks in advance,
Mike
 
=LEFT(a1,SEARCH("-",a1,1)-1)

where A1 contains one of your product codes
 
mike meyer said:
I have some product codes in a column:

123-1
123-3
1406-3
1508-6
154-8
117-5
8957-5
8957-6

I need to extract the main product code left of the dash into the next
column.
I know I have seen this done, just don't remember how it was accomplished.

Thanks in advance,
Mike

Select the column with these codes and use Data|Text To Columns... A wizard
will appear. Click Next and type a - as your separator. The result should
be:

123 1
123 3
1406 3
1508 6
154 8
117 5
8957 5
8957 6


/Fredrik
 
Hi

Insert an empty column to right of codes (when there isn't one ready).
Select all codes, and then from Data menu TextToColumns. Set delimiter to
"-" and finish. As result you get 2 columns
123 1
123 1
1406 3
1508 6
154 8
117 5
8957 5
8957 6

When you want to preserve the old column too, then make a copy it before.


Arvi Laanemets
 
Thanks to all of you!
Works great!
Mike



=LEFT(A1,FIND("-",A1)-1)

-- Carlos
 

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