+ Reply to Thread
Results 1 to 6 of 6

Macro to extract certain data from a source and reformat it

  1. #1
    Forum Contributor
    Join Date
    06-15-2012
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    100

    Macro to extract certain data from a source and reformat it

    Hi,

    Got a bit of a tricky one.

    I've got a list of data that I need to change into a table in a different format.

    If you look at the attached spreadsheet - I need to look at the order numbers of each row and create one "POH" line per order number and multiple "POL" lines per order number (based on how many rows there are per "POL".

    So if we look at the first 2 rows of order number 115074 this would translate to one "POH" line on the output file and two "POL" line. 117373 would translate to one "POH" line and three "POL" lines. Each line extracting data from the columns noted and placing it within the table.

    Hope this makes sense as it's pretty awkward to explain.

    Any help would be reeaaaly appreciated as I've struggled with this for a while.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    05-20-2015
    Location
    Chicago, Illinois
    MS-Off Ver
    2016
    Posts
    2,103

    Re: Macro to extract certain data from a source and reformat it

    How are you looking for them to be stacked in the output sheet? All of the POH lines followed by all of the POL lines, or 115074's POH line followed by 115074's POL lines followed by 11737's POH line followed by 11737's POL line, etc.?

    Additionally, are looking for any data other than what's marked to be transferred to the output sheet?
    Last edited by CAntosh; 02-29-2016 at 12:48 PM. Reason: typo...

  3. #3
    Forum Contributor
    Join Date
    06-15-2012
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    100

    Re: Macro to extract certain data from a source and reformat it

    Hi,

    the second option so 115074's POH line followed by 115074's POL lines followed by 11737's POH line followed by 11737's POL line (which I think makes it more difficult :S)

    I only wish to transfer that data that I've mentioned and in those specific columns.

    Thanks for taking the time to look at this

  4. #4
    Forum Expert
    Join Date
    05-20-2015
    Location
    Chicago, Illinois
    MS-Off Ver
    2016
    Posts
    2,103

    Re: Macro to extract certain data from a source and reformat it

    It isn't my most elegant work, but the procedure below seems to work for me. Take a look:

    Please Login or Register  to view this content.

  5. #5
    Forum Expert
    Join Date
    05-20-2015
    Location
    Chicago, Illinois
    MS-Off Ver
    2016
    Posts
    2,103

    Re: Macro to extract certain data from a source and reformat it

    Sorry, I just noticed I had the order date targeted incorrectly. Fixed:

    Please Login or Register  to view this content.

  6. #6
    Forum Contributor
    Join Date
    06-15-2012
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    100

    Re: Macro to extract certain data from a source and reformat it

    I honestly can't thank you enough, this is a massive help.

    Thanks man

+ 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] Need macro to reformat data
    By s4driver in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 05-16-2013, 02:39 PM
  2. [SOLVED] Need dynamic macro to reformat data from one tab to another
    By s4driver in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-25-2013, 01:12 PM
  3. [SOLVED] Macro help to reformat production data
    By melan555 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-15-2012, 05:41 AM
  4. [SOLVED] VBS Macro to Reformat Data For Import
    By aharb in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 11-14-2012, 05:42 PM
  5. [SOLVED] Macro to reformat raw data in a different worksheet
    By schaasyd in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-25-2012, 07:40 AM
  6. Replies: 1
    Last Post: 12-21-2011, 01:50 PM
  7. Reformat source file as table
    By rafster in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-30-2008, 10:05 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