Hi All!
I am struggling with a formula where I think I need an Vlookup & IF & OR statements for, but I am not sure.
So this is the situation:
Dataset 1:
Column A: Title
Column B: Date
Column C: Where the Formula should show a Number or UNKNOWN
Dataset 2:
Column A: Title
Column B: Start Date
Column C: End Date
Column D: Number
I want it to work like this: If the title in Dataset 1 matches the title in Dataset 2 AND (if the Date from Dataset 1 falls between the start and end date from Dataset 2 OR the date from Dataset 1 falls after the startdate from dataset 2 and the enddate from dataset 2 is empty), I want to show the number (Column D) from dataset 2. If else: show the word 'UNKNOWN'.
I tried changing the formula to this, but for some reason its not working properly.=IF(ISNA(MATCH($A2,'[Dataset 2.xlsx]Sheet1'!$A:$A,0)),"not present",
IF(AND($B2>=VLOOKUP($A2,'[Dataset 2.xlsx]Sheet1'!$A:$D,2,FALSE),
OR(ISEMPTY($B2); $B2<=VLOOKUP($A2,'[Dataset 2.xlsx]Sheet1'!$A:$D,3,FALSE))),
VLOOKUP($A2,'[Dataset 2.xlsx]Sheet1'!$A:$D,4,FALSE),"UNKNOWN"))
I Added two dummy datasets to show what should happen > Dataset 2_NEW.xlsxDataset 1_NEW.xlsx
Please help !
Thanks.
Bookmarks