+ Reply to Thread
Results 1 to 9 of 9

vba code to split complex description data to their respective column

  1. #1
    Forum Contributor
    Join Date
    02-11-2014
    Location
    mauritius
    MS-Off Ver
    MS365
    Posts
    1,086

    vba code to split complex description data to their respective column

    I have a sheet with complex description that consists eight digits , alphanumeric data , always 2 alphabets in a cells followed by comma and repeat same formats

    but alphanumeric data and 2 alphabets may differ

    The data need to be split to their respective columns that is all 8 eight digits , alphanumeric and 2 alphabets to their respective columns after each comma .

    Looking a vba code that can split the data of column A. as it goes to 15000 rows of data

    The data in column can vary up 8 split as expected results sample in blue of attached sheet
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Question Question :


    Is really the source file this workbook attachment or another type like a text file for example ?

  3. #3
    Forum Contributor
    Join Date
    02-11-2014
    Location
    mauritius
    MS-Off Ver
    MS365
    Posts
    1,086

    Re: Question :

    This is an example , the original is not csv nor txt fie.

  4. #4
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: vba code to split complex description data to their respective column

    something like this maybe
    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    02-11-2014
    Location
    mauritius
    MS-Off Ver
    MS365
    Posts
    1,086

    Re: vba code to split complex description data to their respective column

    Nearly on right track ,but the last two alphanumeric appears in the middle (red ) which should not be , but splitting did not work as expected on third split shows only 8 digits code

    Notice also when there is leading 0 infront , it removes the leading zero.
    Attached Files Attached Files

  6. #6
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: vba code to split complex description data to their respective column

    try this
    Please Login or Register  to view this content.

  7. #7
    Valued Forum Contributor Haluk's Avatar
    Join Date
    02-14-2019
    Location
    Turkiye
    MS-Off Ver
    2010 - 64 Bit on Windows-11 (22 H2) 64 Bit
    Posts
    1,147

    Re: vba code to split complex description data to their respective column

    The data seems to obey a specific pattern. So, an alternative using "Regular Expressions" method may be;

    Please Login or Register  to view this content.

    .
    Last edited by Haluk; 07-14-2019 at 05:06 PM.

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

    Re: vba code to split complex description data to their respective column

    For the bulky data.
    Please Login or Register  to view this content.

  9. #9
    Forum Contributor
    Join Date
    02-11-2014
    Location
    mauritius
    MS-Off Ver
    MS365
    Posts
    1,086

    Re: vba code to split complex description data to their respective column

    Hi Nilem,Halul and Jindon

    Thanks for the solution provided , all of them works perfecto.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] vba to split complex merged data to their respective headers
    By JEAN1972 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 05-01-2019, 11:47 AM
  2. [SOLVED] formula to split merged text and numbers to their respective column
    By JEAN1972 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 12-15-2018, 07:08 PM
  3. Formula to split data to their respective columns
    By JEAN1972 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 01-06-2018, 06:42 AM
  4. [SOLVED] formula to split data to their respective columns
    By JEAN1972 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 10-16-2016, 11:50 AM
  5. Need Macro code to split data split in 7 sheets based on variable rows in column A
    By Alija_21 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-31-2015, 08:03 AM
  6. Please Write code for respective Description
    By sai0449 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 12-18-2015, 12:22 PM
  7. Replies: 2
    Last Post: 07-22-2014, 07:44 AM

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