Good afternoon, I have looked thru multiple forums but have not found what I am trying to do. Any help is appreciated. I have an Excel sheet with locations in the first column and multiple truck delivery dates per location off to the right, What I am trying to do is look for the latest delivery date prior to a specific date for a specific location. MAX formula works great to find the date but I'm having trouble finding based on location number lookup. In the example below, I'm looking for the latest date prior to 7/20/2020 for location 110. Correct date is 7/8/2020. Location and dates will vary so I need a formula that can reference 2 cells for looking up location (110) and process date (7/20/2020)
105 6/17/2020 6/26/2020 7/15/2020 7/29/2020 8/14/2020 8/28/2020
106 6/17/2020 6/26/2020 7/15/2020 7/29/2020 8/14/2020 8/28/2020
110 6/9/2020 6/23/2020 7/8/2020 7/22/2020 8/6/2020 8/20/2020
MAX formula that I'm using
=MAX(IF('2020 Schedule'!$D$3:$AA$3<C1,'2020 Schedule'!$D$3:$AA$3))
C1 is the location number I'm looking up and in this case row 3 has all the dates for location 110. This works great as long as I can manually point to row 3 but each week I have hundreds that need looking up.
Where I'm stuck is how do I fold in a lookup or Index/Match etc. to look down for the location number then across for my max date.
Thanks in advance for your assistance.
Bookmarks