Results 1 to 3 of 3

How to get rid of commas between part numbers in a cell?

This is a discussion on How to get rid of commas between part numbers in a cell? within the Excel Questions forums, part of the Question Forums category; I have a worksheet with several fields/cells of which one contains part numbers separated by commas (such as: 8084430-001,8084430-003,8084430-011,8084430-013). These ...

  1. #1
    Board Regular
    Join Date
    Mar 2002
    Posts
    91

    Default How to get rid of commas between part numbers in a cell?

    I have a worksheet with several fields/cells of which one contains part numbers separated by commas (such as: 8084430-001,8084430-003,8084430-011,8084430-013). These part numbers are of different lengths and count.
    I need to place each part number in a cell by itself so that it can be found by a vlookup from another worksheet. Is there a formula or VBA code that can accomplish this? It would take hours to do this manually.

  2. #2
    MrExcel MVP
    Moderator
    Peter_SSs's Avatar
    Join Date
    May 2005
    Location
    Macksville, Australia
    Posts
    25,534

    Default Re: How to get rid of commas between part numbers in a cell?

    Quote Originally Posted by mqarep View Post
    I have a worksheet with several fields/cells of which one contains part numbers separated by commas (such as: 8084430-001,8084430-003,8084430-011,8084430-013). These part numbers are of different lengths and count.
    I need to place each part number in a cell by itself so that it can be found by a vlookup from another worksheet. Is there a formula or VBA code that can accomplish this? It would take hours to do this manually.
    Have a look at Data|Text to Columns...|Delimited|Next|Comma as the delimter etc.

    Could you then use HLOOKUP instead of VLOOKUP?

    If not then Copy the horizontal data and then Edit|Paste Special...|Transpose|OK
    Hope this helps, good luck.
    Peter

    - Read: Posting Guidelines, Forum Rules & FAQs
    - Want to post a small screen shot? Try one of these Excel jeanie, MrExcel HTML Maker or Borders-Copy-Paste (To test: Test Here)
    - If posting vba code, please use Code Tags - like this [code]Paste code here[/code] - or use the VBHTML Maker

  3. #3
    Board Regular
    Join Date
    Oct 2007
    Location
    Auckland, NZ
    Posts
    1,457

    Default Re: How to get rid of commas between part numbers in a cell?

    You can use Data > Text to Columns, the choose comma delimiter.
    If you wan the results in a single column you will then have a manual job to take the 3 or 4 columns and move the data around

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


DMCA.com