+ Reply to Thread
Results 1 to 3 of 3

Mutiple Rows to One Row based on Criteria

  1. #1
    Registered User
    Join Date
    06-20-2017
    Location
    USA
    MS-Off Ver
    Office 2016
    Posts
    2

    Question Mutiple Rows to One Row based on Criteria

    Hi all. This is my first forum post. I have a file with students and test scores, attached below as "Test Data File" with two tabs (original/desired).

    Briefly, I'd like to condense this data into one row per student ID, with each "Code" appearing as a column. Then, I'd like to format the text in the cell to red IF the "Status" associated with the code is "0".

    I have exhausted Google searching for a solution to this, which I foolishly thought would be fairly straightforward. I think my main problem could be that I'm not sure how to approach this need. Is it a function? A formula? A VLOOKUP? VBA?

    Clearly, my Excel knowledge is far too basic to handle this need and I'd appreciate any and all assistance you experts can give.

    Thank you in advance for your expertise, time, and patience.
    Attached Files Attached Files

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

    Re: Mutiple Rows to One Row based on Criteria

    First your codes are wrong in your desired output.
    There are no ALG BIO or USH codes anywhere in your original table.
    Please check your example data before posting otherwise it confuses matters and creates delays in you obtaining a correct solution.

    For your Desired output see attached.
    There are 4 formulas all in the Desired grid.

    Formula 1 O1:S1 lists Original column E and removes any duplicates. This is an array formula.
    Formula 2 N2:N9 list Original column D and remvoes any duplicates. This is an array formula.
    Formula 3 K2:M9 just does an INDEX MATCH to retrieve lookup data based on the unqiue Student ID in column N
    Formula 4 O2:S9 looks at the unique student ids and the unique codes (subject codes?) in the new grid and if both values can be found in the original grid it assigns the value from Original table column F otherwise displays a blank. This is an array formula.
    Attached Files Attached Files
    Last edited by Special-K; 06-21-2017 at 11:51 AM.
    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
    06-20-2017
    Location
    USA
    MS-Off Ver
    Office 2016
    Posts
    2

    Re: Mutiple Rows to One Row based on Criteria

    Thank you so much for your reply. Your solution is exactly what I needed.

    I apologize for creating confusion with my desired column labels. I will be sure to avoid that in the future.

    Again, I truly appreciate your help.

+ 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] COUNTIF mutiple criteria in a single range, but with mutiple ranges.
    By Janbi in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-19-2016, 06:31 AM
  2. [SOLVED] Extract/Copy data within a range based on mutiple criteria?
    By new@excel in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 04-23-2013, 01:11 AM
  3. Create Macro - VBA to send mutiple emails based on a criteria
    By hervaz in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-28-2012, 02:41 PM
  4. Returning maximum values based on mutiple criteria
    By e1504 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 04-01-2012, 05:57 AM
  5. Replies: 3
    Last Post: 04-01-2012, 01:31 AM
  6. Count based on mutiple text criteria
    By Excelerator13 in forum Excel General
    Replies: 4
    Last Post: 12-09-2010, 12:18 PM
  7. Summing times based on mutiple criteria
    By wayne75 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-04-2007, 08:47 AM

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