+ Reply to Thread
Results 1 to 15 of 15

Splitting a Cell based on "/" and adding new Rows based on Part Number Logic

  1. #1
    Forum Expert NeedForExcel's Avatar
    Join Date
    03-16-2013
    Location
    Pune, India
    MS-Off Ver
    Excel 2016:2019, MS 365
    Posts
    3,873

    Splitting a Cell based on "/" and adding new Rows based on Part Number Logic

    Dear Excel Users,

    I have a situation where I have some Part Numbers mentioned in Column A separated by "/".

    However I want only 1 Part number in 1 cell, and I want the remaining Part Numbers to be copied down to the below row with all the other details in Column B Through M remaining same.

    However there are some details that need to be addressed while copying down. (Mentioned in Cell A25 of Attached Sheet)

    Please see attached sheet for understanding.

    I have 1000 such rows.

    Help Appreciated.
    Attached Files Attached Files
    Cheers!
    Deep Dave

  2. #2
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Splitting a Cell based on "/" and adding new Rows based on Part Number Logic

    has revision number always 2 digit ?
    have all other numbers always 3 digit ?
    If solved remember to mark Thread as solved

  3. #3
    Forum Expert NeedForExcel's Avatar
    Join Date
    03-16-2013
    Location
    Pune, India
    MS-Off Ver
    Excel 2016:2019, MS 365
    Posts
    3,873

    Re: Splitting a Cell based on "/" and adding new Rows based on Part Number Logic

    Revision Number can be either 2 or 3 Digits..

    Part Number will always be XXXX XXX XXX (In the attached case - 7325 014 811)

  4. #4
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,524

    Re: Splitting a Cell based on "/" and adding new Rows based on Part Number Logic

    Try this
    Please Login or Register  to view this content.

  5. #5
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Splitting a Cell based on "/" and adding new Rows based on Part Number Logic

    Please Login or Register  to view this content.
    Last edited by patel45; 03-28-2013 at 05:59 AM.

  6. #6
    Forum Expert NeedForExcel's Avatar
    Join Date
    03-16-2013
    Location
    Pune, India
    MS-Off Ver
    Excel 2016:2019, MS 365
    Posts
    3,873

    Re: Splitting a Cell based on "/" and adding new Rows based on Part Number Logic

    @jindon - The Code is working, however if the Revision Number is 3 Digits, it is not giving the desired output.

  7. #7
    Forum Expert NeedForExcel's Avatar
    Join Date
    03-16-2013
    Location
    Pune, India
    MS-Off Ver
    Excel 2016:2019, MS 365
    Posts
    3,873

    Re: Splitting a Cell based on "/" and adding new Rows based on Part Number Logic

    @patel45

    Thank You,

    The Code Worked perfectly..

  8. #8
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,524

    Re: Splitting a Cell based on "/" and adding new Rows based on Part Number Logic

    Quote Originally Posted by msexcelathome View Post
    @jindon - The Code is working, however if the Revision Number is 3 Digits, it is not giving the desired output.
    It doesn't matter if it is even 10 digits. It is working.
    Attached Files Attached Files

  9. #9
    Forum Expert NeedForExcel's Avatar
    Join Date
    03-16-2013
    Location
    Pune, India
    MS-Off Ver
    Excel 2016:2019, MS 365
    Posts
    3,873

    Re: Splitting a Cell based on "/" and adding new Rows based on Part Number Logic

    @ jindon

    Works!!

    Thanks a Lot.. The Code was great!

  10. #10
    Forum Expert NeedForExcel's Avatar
    Join Date
    03-16-2013
    Location
    Pune, India
    MS-Off Ver
    Excel 2016:2019, MS 365
    Posts
    3,873

    Re: Splitting a Cell based on "/" and adding new Rows based on Part Number Logic

    @ Jindon & patel45

    There is a problem.

    The number of "/" may vary.

    The macro is running fine if the number of "/" is 5.

    The Macro is still not running perfectly as the raw data is derived from a Text file and may have some formatting issues.

    I am attaching the original sheet for your reference.

    Please provide a solution.
    Attached Files Attached Files

  11. #11
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,524

    Re: Splitting a Cell based on "/" and adding new Rows based on Part Number Logic

    Your data is dirty.
    Add one line.

    Please Login or Register  to view this content.

  12. #12
    Forum Expert NeedForExcel's Avatar
    Join Date
    03-16-2013
    Location
    Pune, India
    MS-Off Ver
    Excel 2016:2019, MS 365
    Posts
    3,873

    Re: Splitting a Cell based on "/" and adding new Rows based on Part Number Logic

    Yes its dirty.. I have downloaded that as a garb;ed Text File.. Sorry for the inconvenience though.

    Where should I insert that line?

  13. #13
    Forum Expert NeedForExcel's Avatar
    Join Date
    03-16-2013
    Location
    Pune, India
    MS-Off Ver
    Excel 2016:2019, MS 365
    Posts
    3,873

    Re: Splitting a Cell based on "/" and adding new Rows based on Part Number Logic

    And also that last word of the code should be "Then" instead of "The" right?

  14. #14
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,524

    Re: Splitting a Cell based on "/" and adding new Rows based on Part Number Logic

    Please Login or Register  to view this content.

  15. #15
    Forum Expert NeedForExcel's Avatar
    Join Date
    03-16-2013
    Location
    Pune, India
    MS-Off Ver
    Excel 2016:2019, MS 365
    Posts
    3,873

    Re: Splitting a Cell based on "/" and adding new Rows based on Part Number Logic

    Thank You.

    The Code is amazing..

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1