+ Reply to Thread
Results 1 to 16 of 16

Moving data from single to multiple columns and merging

  1. #1
    Registered User
    Join Date
    09-08-2012
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    11

    Moving data from single to multiple columns and merging

    Hello,

    I know I am going to spend hours if not days trying to figure this out (as I have in the past), and probably end up with nothing. This forum has been extremely helpful before. Here's a problem I've currently run into, and hope someone can kindly assist..

    Current Data:
    File 1:
    Each set of data is listed in either two or three rows

    Eg.,
    ID
    Date
    Filename

    ID
    Date

    ID
    Date
    Filename


    The goal is to move them to separate columns (rows can be 3 or 2 for each data set, and may or may not be separated by space/additional row)


    File 2:
    Has a common field 'ID' as that of File1, does not have Date, and Filename, but has a new field 'Detail' (already in the expected format)

    Eg.

    ID Detail

    The goal is to merge properly formatted data from File 1 to File 2

    Eg

    ID Date Filename Detail

    I'll be happy to clarify further if needed. Sample data attached.

    Many thanks in advance.
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    09-08-2012
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    11

    Re: Moving data from single to multiple columns and merging

    bump...
    Waiting on someone's input.

    Thank you.

  3. #3
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Moving data from single to multiple columns and merging

    From where did the "Before Merging" data come?
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  4. #4
    Registered User
    Join Date
    09-08-2012
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    11

    Re: Moving data from single to multiple columns and merging

    Thanks for looking.

    "Before Merging" is File2.
    The end goal is to Merge File1 and File2.

  5. #5
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Moving data from single to multiple columns and merging

    So File2 will be a separate excel workbook?

  6. #6
    Registered User
    Join Date
    09-08-2012
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    11

    Re: Moving data from single to multiple columns and merging

    Correct, it's a separate file/workbook.

    Thanks.

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

    Re: Moving data from single to multiple columns and merging

    See if the attached is what you are after.
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    09-08-2012
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    11

    Re: Moving data from single to multiple columns and merging

    Jindon,

    Thank you! That should do it. However I need to get that Macro applied to my two files File1 and File2. How would this solution fit into that puzzle? In other words, how can I port that to my File1, fix transpose issue, then merge with File2?

    Apologies if it's too basic!

    TY.

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

    Re: Moving data from single to multiple columns and merging

    What do you mean by "File1" and "File2"?

  10. #10
    Registered User
    Join Date
    09-08-2012
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    11

    Re: Moving data from single to multiple columns and merging

    Jindon,

    As per my original note, there are two files - and the details are as follows:


    File 1:

    Eg.,

    ID
    Date
    Filename

    ID
    Date

    ID
    Date
    Filename

    The goal is to move them to separate columns (rows can be 3 or 2 for each data set, and may or may not be separated by space/additional row)


    File 2:
    Has a common field 'ID' as that of File1, does not have Date, and Filename, but has a new field 'Detail' (already in the expected format)


    Eg.

    ID Detail

    The goal is to merge properly formatted data from File 1 to File 2

    Eg

    ID Date Filename Detail


    Thanks.

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

    Re: Moving data from single to multiple columns and merging

    Can you upload workbooks of File1 and File2 with the final result that you want?

  12. #12
    Registered User
    Join Date
    09-08-2012
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    11

    Re: Moving data from single to multiple columns and merging

    Apologies for the delay. Here are the separate files (really the same data, broken down into separate workbooks):

    File1: Data in the original format on a single column (First Tab)
    Data transposed into multiple columns (Second Tab)

    File2: Separate data, already in proper format

    Final: File1 and File2 merged upon File1 reformatting (based on 'ID' field)
    (Prefer sorting by Date; but that's something I can probably do myself)

    Really the goal is to transpose File1 entries and merge the output with File2.

    Thank you again for the help!
    Attached Files Attached Files

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

    Re: Moving data from single to multiple columns and merging

    Try
    Assuming every workbooks are open
    Please Login or Register  to view this content.

  14. #14
    Registered User
    Join Date
    09-08-2012
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    11

    Re: Moving data from single to multiple columns and merging

    Thanks.

    Attached is what I received when I tried running the code:
    Attached Images Attached Images

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

    Re: Moving data from single to multiple columns and merging

    Open "Final.xlsm" and click on the button.
    Attached Files Attached Files

  16. #16
    Registered User
    Join Date
    09-08-2012
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    11

    Re: Moving data from single to multiple columns and merging

    Works exactly the way I requested, but unfortunately the requirement changed a bit; for which we had to leverage MS Access to get it completed.

    Thank you for all the help! This is good to close.

+ 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