+ Reply to Thread
Results 1 to 6 of 6

Comparing columns and returning several values in to one row.

  1. #1
    Registered User
    Join Date
    12-17-2010
    Location
    Scotland
    MS-Off Ver
    Excel 2003
    Posts
    3

    Comparing columns and returning several values in to one row.

    Hello
    I have a quite acompilcated task to achieve. Unfortunaley I am a novice in EXCel Macro and my searching did not obtained the right resutls.
    I have an Excel spreadsheet ( see the example)
    From this I have to move the information from several rows in to one row one a new spreadsheet.
    The cell from one all row which have an identical value in column A are put in one row. The order is by the number of column B
    A B C D E F
    HeadA HeadB HeadC HeadD HeadE HeadF
    1 1 a Z 2 7.8
    1 2 c X 5 10.8
    1 3 e V 9 45
    2 1 g T 1 19
    3 1 a Z 2 7.8
    3 2 c X 5 10.8
    to new sheet:
    HeadA HeadB HeadC HeadD HeadE HeadF HeadB2 HeadC2
    1 1 a Z 2 7.8 2 c
    2 1 g T 1 19
    3 1 a Z 2 7.8 3 2
    I insert the Column A and B already with an macro (sorting, counting and numbering).
    The value for column B can be up to 11 and the value for Column A is up to 1000.
    Currently I can do it manualy for an much smaller number with an index formula, but now I have to do it more automatically and dynamic. I attached a sample file.
    For any help I would be much greatful.
    Regards
    George
    Attached Files Attached Files
    Last edited by Chemgeorge; 12-19-2010 at 03:50 AM.

  2. #2
    Forum Expert
    Join Date
    10-10-2008
    Location
    Northeast Pennsylvania, USA
    MS-Off Ver
    Excel 2007
    Posts
    2,387

    Re: Comparing columns and returning several values in to one row.

    Chemgeorge,

    Welcome to the Excel Forum.

    Detach/open workbook Chemgeorge - EF757190 - SDG13.xlsm and run macro ReorgData.

    A new worksheet, Results, will be created and your data will be re-organized.
    Attached Files Attached Files
    Have a great day,
    Stan

    Windows 10, Excel 2007, on a PC.

    If you are satisfied with the solution(s) provided, please mark your thread as Solved by clicking EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED.

  3. #3
    Registered User
    Join Date
    12-17-2010
    Location
    Scotland
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Comparing columns and returning several values in to one row.

    Hi
    Thanks that was fast. It works great. Now I am trying to understand the function.
    Is it possible to modified this way that the firsttthree columns, after which it is not sorted is only. At the end of the first table are several columns which have to be inserted in each row. I attached a file with the source file and the final layout.
    Regards
    George
    Attached Files Attached Files
    Last edited by Chemgeorge; 12-19-2010 at 03:49 AM.

  4. #4
    Forum Expert
    Join Date
    10-10-2008
    Location
    Northeast Pennsylvania, USA
    MS-Off Ver
    Excel 2007
    Posts
    2,387

    Re: Comparing columns and returning several values in to one row.

    Chemgeorge,

    It has taken me some time to formulate the logic to solve your latest request with a totally different data structure from workhseet Data to worksheet Method.

    I have exceeded the normal amount of time I allocate for solving problems/requests from web sites like Excel Forum.

    I would suggest that you click on the New Post button, and just enter the word BUMP, and then click on the Submit Reply button, and someone else will assist you.

  5. #5
    Registered User
    Join Date
    12-17-2010
    Location
    Scotland
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Comparing columns and returning several values in to one row.

    Hi,
    Thanks for the fast reply. Well this was just an idea. i thought it might be "easy".- Thanks for the great and fast help. I really appreciate this.
    Regards
    Chemgeorge

  6. #6
    Forum Expert
    Join Date
    10-10-2008
    Location
    Northeast Pennsylvania, USA
    MS-Off Ver
    Excel 2007
    Posts
    2,387

    Re: Comparing columns and returning several values in to one row.

    Chemgeorge,

    I tried to reply to your post on the Ozgrid forum, but was having a problem.

    Detach/open workbook Chemgeorge - OZ149108 - SDG15.xlsm and run macro ReorgDataV4.
    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)

Tags for this Thread

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