+ Reply to Thread
Results 1 to 6 of 6

Latest Date

  1. #1
    Registered User
    Join Date
    03-14-2010
    Location
    Manila, Philippines
    MS-Off Ver
    Excel 2007
    Posts
    15

    Latest Date

    Here's my problem, I have these cells and what should happen is, I should be able to highlight those having the LATEST DATES with the same data as those from A B and C. As you can see, the bold ones are those with the same A,B,C values but differ in their D value because of date. The latest one should highlighted - I'm leaning towards putting a formula on conditional formatting. Can this be done without VBA? Thanks in advance!

    A B C D
    1008 MP31 24014460 4/8/2008
    1008 MP31 24014460 4/8/2008 <- not highlighted because it has same date as above
    1008 MP40 21177380 2/5/2008
    1008 MP40 21177380 2/29/2008 <- highlighted because it has the later date from the one above (they have same A,B,C values)
    1008 MP40 24005153 7/14/2008
    1008 MP40 24005153 7/30/2008
    1008 MP40 24005154 8/11/2008
    1008 MP40 24005154 8/30/2008 <- same here too
    1008 MP40 24005155 10/23/2008
    1008 MP40 24005155 10/30/2008 <- highlighted since it is the latest one even though its single
    1008 MP40 24014454 1/5/2008
    1008 MP40 24014459 1/5/2008
    1008 MP40 24014460 4/10/2008
    1008 MP40 24014460 4/28/2008
    1008 MP40 24017729 4/28/2008
    1008 MP40 24017729 5/31/2008
    Last edited by sgpao; 03-14-2010 at 11:33 PM.

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,960

    Re: Latest Date problem

    For Cond Fmt'g, try:
    Please Login or Register  to view this content.
    Here's a small sheet macro that will do it:
    Please Login or Register  to view this content.
    Ben Van Johnson

  3. #3
    Registered User
    Join Date
    03-14-2010
    Location
    Manila, Philippines
    MS-Off Ver
    Excel 2007
    Posts
    15

    Re: Latest Date problem

    Thanks for the reply.

    I tried the macro but it was still highlighting values which were not supposed to be highlighted. Also, do either of those work or do you place both of them in the sheet?

    Here's a sample of what the result looked like

    1008 MP31 24014460 4/8/2008 <- should be highlighted
    1008 MP31 24014460 4/8/2008 <- should be highlighted
    1008 MP40 21177380 2/5/2008
    1008 MP40 21177380 2/29/2008 <- correct
    1008 MP40 24005153 7/14/2008 <- not this
    1008 MP40 24005153 7/30/2008 <- ok
    1008 MP40 24005154 8/11/2008 <- no
    1008 MP40 24005154 8/30/2008 <- should be higlighted
    1008 MP40 24005155 10/23/2008 <- not
    1008 MP40 24005155 10/30/2008
    <- ok
    1008 MP40 24014454 1/5/2008
    1008 MP40 24014459 1/5/2008
    1008 MP40 24014460 4/10/2008
    1008 MP40 24014460 4/28/2008

    1008 MP40 24017729 4/28/2008
    1008 MP40 24017729 5/31/2008
    1008 MP40 24017731 2/8/2008
    1008 MP40 24017731 2/29/2008
    1008 MP40 24017732 2/20/2008
    1008 MP40 24017732 2/29/2008

  4. #4
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Latest Date problem

    Given your data is seemingly sorted by A,B,C & D I would probably use a "key" to keep things relatively efficient

    E1: =A1&"@"&B1&"@"&C1
    copied down

    Then, with A1:Dn highlighted you can apply a Conditional Format rule of:

    =$D1=LOOKUP($A1&"@"&$B1&"@"&$C1,$E:$E,$D:$D)
    format as bold

  5. #5
    Registered User
    Join Date
    03-14-2010
    Location
    Manila, Philippines
    MS-Off Ver
    Excel 2007
    Posts
    15

    Re: Latest Date problem

    Thank you so much, that works!

    How does it work though? I'm really an excel noob.
    Last edited by shg; 03-15-2010 at 01:54 PM. Reason: deleted spurious quote

  6. #6
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Latest Date

    The LOOKUP returns the date associated with the last instance of the combination of A & B & C in the current row ... if that date matches the date in the current row (D) then the conditional formatting is applied.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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