Use newest date in a range for formula

liiiiiiiiza

New Member
Joined
Jun 20, 2020
Messages
2
Office Version
2011
Platform
Windows
I am a Field Sales rep and I have an excel report of what hospitals I went to on what days.

I'm trying to make a heat map using conditional formatting to visualize time passage regarding who I haven't visited recently. I'm using the below formula to pull up the visit date minus today's date which works well for the heat map:

=(Sheet3!$A$4-TODAY())

This works with business that show up a single time in my report (one visit, like "Happy Tails Hospital" below). However, here is where I'm hitting a snag: If I visited a business multiple times recently, it will show up as multiple entries (like "Claws and Paws" below). When there are multiple entries, I need a way to have the formula use the newest date for that business to calculate the time passage. So for Claws and Paws, I would need it to apply the 3/5/2020 date to the "heat map" formula from the Raw data sheet.

Raw data sheet:
1592684151906.png


Heat map sheet:
1592684194701.png
 

Attachments

Some videos you may like

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.

gaz_chops

Well-known Member
Joined
Apr 29, 2003
Messages
6,468
Platform
MacOS
Try -
Change the sheet name to match yours

=MAX(IF(Raw data sheet$B$2:$B$9=A2,Raw data sheet$A$2:$A$9))-TODAY()

Enter as an array with Ctrl, Shift & Enter
 

liiiiiiiiza

New Member
Joined
Jun 20, 2020
Messages
2
Office Version
2011
Platform
Windows
THIS WORKED! You're a genius! I need to learn about arrays.
 

Subscribe on YouTube

Watch MrExcel Video

Forum statistics

Threads
1,106,175
Messages
5,509,601
Members
408,743
Latest member
leen1234

This Week's Hot Topics

  • Turn fraction around
    Hello I need to turn a fraction around, for example I have 1/3 but I need to present as 3/1
  • TIme Clock record reformatting to ???
    Hello All, I'd like some help formatting this (Tbl-A)(Loaded via Power Query) [ATTACH type="full" width="511px" alt="PQdata.png"]22252[/ATTACH]...
  • TextBox Match
    hi, I am having a few issues with my code below, what I need it to do is when they enter a value in textbox8 (QTY) either 1,2 or 3 the 3 textboxes...
  • Using Large function based on Multiple Criteria
    Hello, I can't seem to get a Large formula to work based on two criteria's. I can easily get a oldest value based one value, but I'm struggling...
  • Can you check my code please
    Hi, Im going round in circles with a Compil Error End With Without With Here is the code [CODE=rich] Private Sub...
  • Combining 2 pivot tables into 1 chart
    Hello everyone, My question sounds simple but I do not know the answer. I have 2 pivot tables and 2 charts that go with this. However I want to...
Top