I have two excel tables in separate sheets:
table1:
Site_ID ....... Visit_Date
--------------------------
AS01 12-Feb-23
ES96 10-Jan-23
GH15 14-Mar-23
AS01 26-Mar-23
VD10 08-Apr-23
LS18 14-Jan-23
GH15 26-Mar-23
table2:
01-Feb-23 01-Mar-23 01-Apr-23
28-Feb-23 31-Mar-23 30-Apr-23
Site ID FEB23 MAR23 APR23
---------------------------------------------
AS01
ES96
GH15
VD10
LS18
If the date falls within the acceptable range indicated above the table2 heading, I want to look for the Site ID in table1 and insert Visit Date in table2.
I tried the following formula:
=VLOOKUP(table2[@[Site ID]:[Site ID]],IF((table1[[Visit_Date]:[Visit_Date]]>=E$1)*(table1[[Visit_Date]:[Visit_Date]]<=E$2),table1[[Site_ID]:[Visit_Date]],""),12,FALSE)
Unfortunately, the FEB23 field produces dates that are out of range, and the remaining columns yield value errors. Why am I misusing this?