Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
mike meyer
 
Posts: n/a
Default Cleaning Product Code list

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


  #2   Report Post  
Duke Carey
 
Posts: n/a
Default

=LEFT(a1,SEARCH("-",a1,1)-1)

where A1 contains one of your product codes


"mike meyer" wrote:

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



  #3   Report Post  
Ron Coderre
 
Posts: n/a
Default

Here you go:
=LEFT(A1,FIND("-",A1)-1)

Regards,
Ron

  #4   Report Post  
Fredrik Wahlgren
 
Posts: n/a
Default


"mike meyer" wrote in message
...
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


  #5   Report Post  
CarlosAntenna
 
Posts: n/a
Default


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

-- Carlos

"mike meyer" wrote in message
...
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






  #6   Report Post  
Arvi Laanemets
 
Posts: n/a
Default

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


"mike meyer" wrote in message
...
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




  #7   Report Post  
mike meyer
 
Posts: n/a
Default

Thanks to all of you!
Works great!
Mike


"CarlosAntenna" wrote in message
...

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

-- Carlos

"mike meyer" wrote in message
...
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





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I add an area code to a list of phone numbers in Excel? PPuser Excel Worksheet Functions 2 April 5th 05 08:35 PM
Make Change Case in Excel a format rather than formula Kevin Excel Worksheet Functions 1 March 18th 05 08:53 PM
Which function(s)? LB Excel Worksheet Functions 3 January 5th 05 06:19 PM
my computor crashed and I lost my product code to reinstall how c. jamie Excel Discussion (Misc queries) 2 December 7th 04 06:08 PM
If statement needed Patsy Excel Worksheet Functions 1 November 4th 04 03:48 PM


All times are GMT +1. The time now is 01:05 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"