+ Reply to Thread
Results 1 to 4 of 4

Transpose column to rows based on values in two other columns

  1. #1
    Registered User
    Join Date
    05-11-2017
    Location
    Rigby, Idaho
    MS-Off Ver
    Excel Mac 2011 (Version 14.7.2)
    Posts
    3

    Transpose column to rows based on values in two other columns

    I've got a data set of test-takers performance on thousands of items on a few different versions of a test.

    Screen Shot 2017-05-11 at 1.50.28 AM.png

    Column A = test_id (a unique value that indicates on a different spreadsheet which version of the test this was, taken by which student)
    Column B = item_id (a non-unique value that repeats. This is the id assigned to each individual test question)
    Column C = Syl Correct (basically, the score of the question)
    Column D = column A with duplicates removed
    I've laid out all of the test questions (all possible item_id's) in the remaining columns.

    I need to transpose the scores in Column C for each unique test ID, but since not every question is on each test, I need to go cell by cell and check if the item_id matches a value in Column B, but only where Column A equals the value in cell D2. So that is the logic I need in words. I need to translate this into an excel formula.

    My best guess is to use an IF formula, but I'm struggling figuring how to represent this logic test. Something like this:

    =IF(E$2=the value in a cell in column B, but only for the range where Column A=$D2, $C2, "") I think "" means leave blank, but I could be wrong

    Does anyone know how to represent this logic to run the if statement?

    Here is the attachment to the spreadsheet
    https://www.excelforum.com/attachmen...1&d=1494520552
    Attached Images Attached Images
    Attached Files Attached Files
    Last edited by jacobburdis; 05-11-2017 at 12:36 PM.

  2. #2
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,064

    Re: Transpose column to rows based on values in two other columns

    Can you attach the workbook otherwise anyone that wants to solve this has to reproduce test date and we'll all be typing in the same thing?
    Remove/rename any sensitive data if necessary.

    You might be able to get away with an INDEX(MATCH(IF...))
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  3. #3
    Registered User
    Join Date
    05-11-2017
    Location
    Rigby, Idaho
    MS-Off Ver
    Excel Mac 2011 (Version 14.7.2)
    Posts
    3

    Re: Transpose column to rows based on values in two other columns

    Thanks, I added the attachment.

    https://www.excelforum.com/attachmen...1&d=1494520552

  4. #4
    Registered User
    Join Date
    05-11-2017
    Location
    Rigby, Idaho
    MS-Off Ver
    Excel Mac 2011 (Version 14.7.2)
    Posts
    3

    Re: Transpose column to rows based on values in two other columns

    Actually, after a lot more digging, i figured it out.

    {=IFERROR(INDEX($C$2:$C$33,MATCH(1,($D2=$A$2:$A$33)*(E$1=$B$2:$B$33),0)),"")}

    And then just drag across all columns

+ 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 a Macro to Transpose and Combine like Values from rows to columns
    By Isara-NJ in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 04-27-2017, 08:38 AM
  2. Extract values and the use index to transpose values across columns to rows
    By bjnockle in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 03-19-2017, 08:46 PM
  3. Transpose Columns into Rows based on Unique Identifier for n columns
    By bhavt010785 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-01-2017, 11:55 AM
  4. Transpose values in column to rows, and split cell values to extend column
    By SAMMM in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 04-03-2015, 12:52 AM
  5. Transpose a set of 6 rows to one column and repeat for next columns
    By labamba in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 04-14-2013, 05:06 AM
  6. [SOLVED] How to transpose one column into multiple rows and columns?
    By Raoul Gonzo in forum Excel General
    Replies: 4
    Last Post: 01-15-2013, 11:00 AM
  7. Convert rows to columns based on values in a column
    By happy days in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-12-2012, 05:36 AM

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