Looking up the Latest Date (in time) Given 2 Other Criteria Match


New Member
Jul 28, 2010
Hello All,

This may have a fairly easy solution but I am an intermediate Excel user so I am not fully versed in some of the more detailed formulas.

I hate two table side by side on the same worksheet.

Table 1 has columns:

  1. Item
  2. Sales order #
  3. Quantity
  4. Expected Delivery Date

Table 2 has columns:

  1. Item
  2. Sales order #
  3. Quantity
  4. Expected ship date

Table 2 is when I am expecting to receive the said items and quantities and table 1 is when customer a is expecting me to deliver the same items and quantity.

For each row in table 1, I want to highlight it if the expected ship date in table 2 is later than the expected delivery date in table 1. But since I can have multiple entries of the same sales order in table 2, I need this conditional formating to take into account the following.

Highlight row in table 1 if:

  1. Item
  2. Sales order #

Then select the latest date in table 2 (date in time, not in sequence) and if the latest date in table 2 is later than the date in table 1, highlight the row in table 1 in red.

I would prefer to do this using formulas please. I really appreciate any feedback anyone has on this.

Some videos you may like

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.

Subscribe on YouTube

Watch MrExcel Video

Forum statistics

Latest member

This Week's Hot Topics

  • Sort code advice please
    Hi, I have the code below which im trying to edit but getting a little stuck. This was the original code which worked fine,columns A-F would sort...
  • SUMPRODUCT with nested If statement
    Hi everyone, Hope you're all well. I'm hoping someone will be able to point me in the right direction with a problem I'm having with a SUMPRODUCT...
  • VBA - simple sort is killing me!
    Hello all! This should be so easy, but not for me, apparently! I have a table of data that can be of varying lengths and widths. My current macro...
  • Compare Two Lists
    I have two Lists and I need to be able to Identify differences between them. List 100 comes from a workbook - the other is downloaded form the...
  • Formula that deducts points for each code I input.
    I am trying to create a formula that will have each student in my class start at 100 points and then for each code that I enter (PP for Poor...
  • Conditional formatting formula required for day of week and a value
    Hi, I have a really simple spreadsheet where column A is the date, column B is the activity total shown as a number and column C states the day of...