I have been trying to retrieve the row in the following sheet (sheet1) where the dates are matching dates in sheet2 without duplicating the IDs in Sheet1 (Column B)
Sheet1
Sheet2
In other words, I want to check if EITHER dates in Sheet2 exists in Sheet1 for an ID in Column B and obtain the row in Sheet1 with the more recent date of the two selected dates in sheet2. Here is an example of the output I want:
Example Output
So far, I am getting duplicates of IDs: one with each of the two dates.
(It has to be a formula since this will be dynamic where a different date would be selected in sheet 2)
Here is my formula currently:
=IFERROR(INDEX(Sheet1!$A$2:$C$11, LARGE(IF(((Sheet1!$C$2:$C$11=Sheet2!$C$2)+(Sheet1!$C$2:$C$11=Sheet2!$C$3)>0),
MATCH(ROW(Sheet1!$B$2:$B$11), ROW(Sheet1!$B$2:$B$11)), “”), ROW(Sheet1!C1)), COLUMN(Sheet1!A1)),
“”)
Here is the output I am getting. Notice the duplicated IDs in red. I only want the rows with more recent dates in green.
I’m not opposed to helper columns but The data in sheet1 is also subject to change and I don’t want my output to have any gaps.
I’m very new to this so any suggestions are appreciated! Please! I have been at this for days now.
Here is the image of the excel sheets: