+ Reply to Thread
Results 1 to 3 of 3

Keeping certain rows

  1. #1
    Forum Contributor
    Join Date
    10-09-2015
    Location
    Canada
    MS-Off Ver
    Office Home and Student 2021 for Mac
    Posts
    170

    Keeping certain rows

    Hi all,

    I'm having some issues restructuring my data so that it will only display certain rows.

    I have 3 columns (one for ID, one for program and one for end date). Since IDs will have multiple end dates, I would like to only keep the latest one within that program group by student.

    I've attached a copy of a workbook with the current data set as well as the desired result.

    Any help would be greatly appreciated.

    Thanks!

    D.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    11-22-2016
    Location
    Cornwall,UK
    MS-Off Ver
    office 365
    Posts
    4,240

    Re: Keeping certain rows

    Here is one way

    See attached worksheet with desired results returned

    Create a helper column D in sheet "Sample" (MAX formula much simpler with name of student available on each row)
    fornula in cell D2 copied down
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    in Sheet "Desired Result"
    formula in cell D2 copied down
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    this is an array formula and must be confirmed {CTRL}{SHIFT}{ENTER}

    and will look like this in the cell
    {=MAX(IF(Sample!D:D=A2,Sample!C:C))}

    you cannot enter the { } brackets manually - it will not work

    MAXIFS
    Function MAXIFS avoids the need for an array formula, but is not available in all versions of Excel
    Try this formula (in sheet "Desired Result") in cell E2 copy down
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    It returns same as column D
    Attached Files Attached Files
    Last edited by kev_; 01-26-2018 at 06:30 AM.
    Click *Add Reputation to thank those who helped you. Ask if anything is not clear

  3. #3
    Forum Contributor
    Join Date
    10-09-2015
    Location
    Canada
    MS-Off Ver
    Office Home and Student 2021 for Mac
    Posts
    170

    Re: Keeping certain rows

    Quote Originally Posted by kev_ View Post
    Here is one way

    See attached worksheet with desired results returned

    Create a helper column D in sheet "Sample" (MAX formula much simpler with name of student available on each row)
    fornula in cell D2 copied down
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    in Sheet "Desired Result"
    formula in cell D2 copied down
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    this is an array formula and must be confirmed {CTRL}{SHIFT}{ENTER}

    and will look like this in the cell
    {=MAX(IF(Sample!D:D=A2,Sample!C:C))}

    you cannot enter the { } brackets manually - it will not work

    MAXIFS
    Function MAXIFS avoids the need for an array formula, but is not available in all versions of Excel
    Try this formula (in sheet "Desired Result") in cell E2 copy down
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    It returns same as column D
    Thanks so much for the guidance! Helped a great deal

+ 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: 7
    Last Post: 08-05-2014, 05:34 AM
  2. keeping color of rows the same
    By mbeyatli in forum Excel General
    Replies: 3
    Last Post: 03-17-2014, 09:35 AM
  3. Replies: 9
    Last Post: 05-24-2013, 01:31 PM
  4. Replies: 4
    Last Post: 04-24-2013, 04:58 AM
  5. [SOLVED] Combining Rows and keeping data from both rows.
    By chezbgone in forum Excel General
    Replies: 4
    Last Post: 03-10-2013, 06:06 AM
  6. [SOLVED] Delete rows while keeping the rows with numrics
    By Sijal in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 10-06-2012, 01:48 PM
  7. Replies: 3
    Last Post: 04-27-2011, 04:11 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