+ Reply to Thread
Results 1 to 5 of 5

two columns of data x y, where x repeats and I want unique new set y values in own column

  1. #1
    Registered User
    Join Date
    01-23-2014
    Location
    NS, canada
    MS-Off Ver
    Excel 2013
    Posts
    2

    two columns of data x y, where x repeats and I want unique new set y values in own column

    I have data sets that got put all together in two columns. In the first column I have the x values just repeating for each new set of data with the corresponding y values in the second column. I want to leave the first set of x values in the first column and then get each set of y values moved to their own column. I am using Excel 2013.

    the data looks something like this:

    10 302
    11 489
    12 367
    10 100
    11 268
    12 187
    10 78
    11 89
    12 99

    And I need it to look like this:

    10 302 100 78
    11 489 268 89
    12 367 187 99

    Any help would be greatly appreciated!

  2. #2
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: two columns of data x y, where x repeats and I want unique new set y values in own col

    Hi and welcome to the forum!

    Can you just be a bit more precise about the actual data set-up you have?

    For example, is the number of repetitions of the set of x values constant? I mean, will it always go, e.g.:

    10, 11, 12, 10, 11, 12, 10, 11, 12, ...

    or could it perhaps vary at some point to:

    10, 11, 12, 10, 11, 12, 10, 11, 10, 11, ...?

    If it is constant, does it always consist of three entries, as in your example?

    Regards
    Last edited by XOR LX; 01-24-2014 at 01:25 PM.
    Click * below if this answer helped

    Advanced Excel Techniques: http://excelxor.com/

  3. #3
    Registered User
    Join Date
    01-23-2014
    Location
    NS, canada
    MS-Off Ver
    Excel 2013
    Posts
    2

    Re: two columns of data x y, where x repeats and I want unique new set y values in own col

    It is always constant, although in the real data there are 300 entries

  4. #4
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: two columns of data x y, where x repeats and I want unique new set y values in own col

    Thanks. And to answer my other question, is it always 3?

    Regards

  5. #5
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: two columns of data x y, where x repeats and I want unique new set y values in own col

    One way...

    Data Range
    A
    B
    C
    D
    E
    F
    G
    H
    1
    Item
    Values
    -----
    Item
    Values
    -----
    -----
    2
    10
    302
    10
    302
    100
    78
    3
    11
    489
    11
    489
    268
    89
    4
    12
    367
    12
    367
    187
    99
    5
    10
    100
    6
    11
    268
    7
    12
    187
    8
    10
    78
    9
    11
    89
    10
    12
    99
    11


    You can use advanced filter to create a list of the unique entries from column A.

    Select the data in column A including the column header.
    Goto the Data tab
    Sort & Filter group>Advanced
    Select: Copy to another location
    Copy to: $D$1
    Select: Unique records only
    OK

    Then, enter this formula in E2:

    =IFERROR(INDEX($B:$B,AGGREGATE(15,6,1/($A$2:$A$10=$D2)*ROW(A$2:A$10),COLUMNS($E2:E2))),"")

    Copy down to E4 then across until you get a column full of blanks.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

+ 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. Replies: 1
    Last Post: 11-16-2013, 05:18 AM
  2. Replies: 8
    Last Post: 09-12-2013, 09:17 AM
  3. Compare 2 columns of data and get unique values in the 3rd column
    By Eduard in forum Excel Programming / VBA / Macros
    Replies: 30
    Last Post: 04-04-2013, 08:32 AM
  4. [SOLVED] VLOOKUP-data that repeats within a column and the values to carry over vary
    By excelsonic in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-01-2012, 06:20 PM
  5. Replies: 3
    Last Post: 07-04-2008, 07:42 PM

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