Nested if statement to look in between multiple date columns to see if tag is applicable based on 1 date

lizfrinko

New Member
Joined
May 1, 2019
Messages
1
Hi everyone,
I need help writing a nested if statement to solve for the "desired result" column. I need to look in between each of these dates and determine which was most recent to the "comparison date", and display the "desired result" tag.

The combinations on this are driving me crazy and I think there has to be a simple approach here. Do I write the if statement to look between all the date columns aside from the comparison date? Any help is appreciated, thank you.

DateADateATagDateBDateBTagDateCDateCTagDateDDateDTagComparison DateDesired Result
11/14/2017AAA3/27/2019BBB4/22/2019CCC--4/21/2019CCC
2/1/2018AAA------4/29/2019AAA
3/1/2017AAA4/1/2017BBB5/1/2018CCC1/5/2015DDD4/29/2019CCC
11/1/2018AAA12/15/2018BBB1/5/2019CCC2/6/2019DDD4/29/2019DDD

<tbody>
</tbody>
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
Welcome to the forums. Maybe try the below formula in Cell K2. Then just copy down the formula.

Code:
=INDEX(A2:H2,,MATCH(MAX(A2:H2),A2:H2,0)+1)
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,012
Messages
6,122,682
Members
449,091
Latest member
peppernaut

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top