+ Reply to Thread
Results 1 to 8 of 8

Need macro to reformat data

  1. #1
    Forum Contributor
    Join Date
    09-12-2012
    Location
    Michigan
    MS-Off Ver
    Excel 2007
    Posts
    127

    Need macro to reformat data

    Hittting a wall with this one. I need to script that can take the data from sheet1 and format it on sheet2. Sheet3 shows what data is desired and how it should be formatted, and sheet1 needs to remain intact. I haven't had any luck on my attempts getting it right, hoping that someone smarter than me can figure it out. thanks in advance, s4

  2. #2
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Need macro to reformat data

    Hi s4

    Do you do only one Company at a time or will there be multiple Companies? If multiple please post a sample of the Raw Data with multiple Companies.
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  3. #3
    Forum Contributor
    Join Date
    09-12-2012
    Location
    Michigan
    MS-Off Ver
    Excel 2007
    Posts
    127

    Re: Need macro to reformat data

    The raw data is on sheet1, there are 3 vendors in the example that I posted.

  4. #4
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Need macro to reformat data

    Hi s4

    Hah...I just opened your file on my platform and I see that. Sorry for the oversight...

  5. #5
    Forum Contributor
    Join Date
    09-12-2012
    Location
    Michigan
    MS-Off Ver
    Excel 2007
    Posts
    127

    Re: Need macro to reformat data

    no prob...

  6. #6
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Need macro to reformat data

    Hi s4

    I have Code that appears to do as you require on your SAMPLE file. Chances of it working on your live Data are slim to none. The problem is, all your Customer Names in the sample file follow the same pattern (same number of characters, same breaks in the string, etc).

    Please post a sample file that is representative of your actual data and I'll see if I can adapt the Code.

  7. #7
    Forum Contributor
    Join Date
    09-12-2012
    Location
    Michigan
    MS-Off Ver
    Excel 2007
    Posts
    127

    Re: Need macro to reformat data

    The sample file is in the same format as the live data. I just cut a chunk out of the live to make this sample file. You could manually change the vendors to make them have different number of characters. The max is 22 characters per line for that field. thanks, s4

  8. #8
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Need macro to reformat data

    Hi s4

    Well, even in "slim to none", there's still a chance. Attached is your sample file with Code that appears to work on that file. Run the Code from the button on Sheet2.
    Let me know of issues.
    Attached Files Attached Files

+ 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