Forum Discussion
Zdenek_Moravec
Feb 17, 2022Brass Contributor
Lookup date from one table within date range in another table
Dear colleagues, I have a table with list of names and their vaccination date. Next table contains the names and when they were hospitalized from – to. Vaccination table Hospital table ...
- Feb 18, 2022
As variant
=LET( d, FILTER( T_Vacc[vaccination date], T_Vacc[Name] = [@Name] ), check, (MAX(d) >= [@[Hospitalized from]]) * (MIN(d) <= [@[Hospitalized to]]), IF(check, "Yes", "No") )
Zdenek_Moravec
Feb 17, 2022Brass Contributor
Hello
Thank You very much.
And if I want to return the passed vaccination date instead of Yes/No?
Zdenek
Thank You very much.
And if I want to return the passed vaccination date instead of Yes/No?
Zdenek
OliverScheurich
Feb 18, 2022Gold Contributor
=IFERROR(INDEX(T_Vacc[vaccination date],LARGE(IF((D3=T_Vacc[Name])*(E3>=T_Vacc[vaccination date]),ROW($1:$9)),1)),"No")
Do you want to return the last vaccination date before the hospitalized from date? Enter formula with ctrl+shift+enter if you don't work with Office365 or 2021.