+ Reply to Thread
Results 1 to 10 of 10

Merging several rows of data into one row.

  1. #1
    Registered User
    Join Date
    07-04-2012
    Location
    Lincoln, England
    MS-Off Ver
    Excel 2007
    Posts
    13

    Merging several rows of data into one row.

    Hi, i need some advice please, i have a page of data that looks like this-

    (each date, name, and number is in it's own cell)

    18-Jun-12 Smith, John 5 70
    18-Jun-12 Smith, John 1 90
    18-Jun-12 Smith, John 1 126

    and i have to get it all into one row to look like this to import into another program

    18-Jun-12 Smith, John 5 70 1 90 1 126

    Sometimes the data is in more than 3 rows, maybe up to 7 and there is up to 200 names on the list.
    I am currently doing this manually one row at a time as a formula or macro is well beyond my knowledge, maybe not even possible.

    Sorry to be a bit of a leech on the forum

    Many thanks for any input/advice.

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

    Re: Merging several rows of data into one row.

    Do you have a sample file that you can upload?
    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]

  3. #3
    Registered User
    Join Date
    07-04-2012
    Location
    Lincoln, England
    MS-Off Ver
    Excel 2007
    Posts
    13

    Re: Merging several rows of data into one row.

    Sample file1.xls

    Here is a sample of my data, thanks for looking
    Last edited by Lozhaze; 07-04-2012 at 08:23 AM.

  4. #4
    Registered User
    Join Date
    07-07-2010
    Location
    south africa
    MS-Off Ver
    Excel 2007
    Posts
    34

    Re: Merging several rows of data into one row.

    Hi,

    Try this =CONCATENATE(A1," ",B1," ",C1," ",D1) you will just need to check your date formate as it pulls through as a number.
    Keep life simple

  5. #5
    Registered User
    Join Date
    07-04-2012
    Location
    Lincoln, England
    MS-Off Ver
    Excel 2007
    Posts
    13

    Re: Merging several rows of data into one row.

    Hi Jay, thanks for your input but that won't do the job i need.

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

    Re: Merging several rows of data into one row.

    What if the date is different but the name is the same?

  7. #7
    Registered User
    Join Date
    07-04-2012
    Location
    Lincoln, England
    MS-Off Ver
    Excel 2007
    Posts
    13

    Re: Merging several rows of data into one row.

    I should have said that the date is not really important, i could delete the date column before i start, sorry.

    The figures are hours/days and pay rates respectively.

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

    Re: Merging several rows of data into one row.

    Try this code
    Please Login or Register  to view this content.
    If you have headings in row1, then change this line
    Please Login or Register  to view this content.
    to
    Please Login or Register  to view this content.

    Copy the Excel VBA code
    Select the workbook in which you want to store the Excel VBA code
    Hold the Alt key, and press the F11 key, to open the Visual Basic Editor
    Choose Insert | Module
    Where the cursor is flashing, choose Edit | Paste

    To run the Excel VBA code:
    Choose View | Macros
    Select a macro in the list, and click the Run button

  9. #9
    Registered User
    Join Date
    07-04-2012
    Location
    Lincoln, England
    MS-Off Ver
    Excel 2007
    Posts
    13

    Re: Merging several rows of data into one row.

    That appears to work absolutely perfectly, fantastic knowledge and skills.

    Thank you very much.

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

    Re: Merging several rows of data into one row.

    Thanks. Am glad it worked.

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.

    New quick method:
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

    Or you can use this way:

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save

+ 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