I have a table with not unique names like below:
|-|---------------------|------------------|
| | A | B |
|-|---------------------|------------------|
|1| John | 01.01.1900 |
|-|---------------------|------------------|
|2| Adam | 01.02.1900 |
|-|---------------------|------------------|
|3| John | 01.03.1900 |
|-|---------------------|------------------|
|4| Jane | 01.04.1900 |
|-|---------------------|------------------|
And I have another table with unique names like:
|-|---------------------|----------|----------|----------|----------|
| | A | B | C | D | E |
|-|---------------------|----------|----------|----------|----------|
|1| Name |01.01.1900|01.02.1900|01.03.1900|01.04.1900|
|-|---------------------|----------|----------|----------|----------|
|2| John | | | | |
|-|---------------------|----------|----------|----------|----------|
|3| Adam | | | | |
|-|---------------------|----------|----------|----------|----------|
|4| Jane | | | | |
|-|---------------------|----------|----------|----------|----------|
Now I want to highlight the cells in the second table if name and date match with the first table and make it look like:
|-|---------------------|----------|----------|----------|----------|
| | A | B | C | D | E |
|-|---------------------|----------|----------|----------|----------|
|1| Name |01.01.1900|01.02.1900|01.03.1900|01.04.1900|
|-|---------------------|----------|----------|----------|----------|
|2| John | 1 | | 1 | |
|-|---------------------|----------|----------|----------|----------|
|3| Adam | | 1 | | |
|-|---------------------|----------|----------|----------|----------|
|4| Jane | | | | 1 |
|-|---------------------|----------|----------|----------|----------|
I've tried using the FILTER() function in B2 cell (for John only):
=IF(B$1=FILTER('dates'!$B$2:$B$4;'dates'!$A$2:$A$4=$A2);1;0) where "dates" is name of the sheet with the first table and then expanding it to other cells in the 2nd row, but when I do it I get the following:
|-|---------------------|----------|----------|----------|----------|
| | A | B | C | D | E |
|-|---------------------|----------|----------|----------|----------|
|1| Name |01.01.1900|01.02.1900|01.03.1900|01.04.1900|
|-|---------------------|----------|----------|----------|----------|
|2| John | 1 | 0 | 0 | 0 |
|-|---------------------|----------|----------|----------|----------|
|3| Adam | 0 | 0 | 1 | 0 |
|-|---------------------|----------|----------|----------|----------|
|4| Jane | | | | |
|-|---------------------|----------|----------|----------|----------|
Do you have any ideas?

XLOOKUP()you might have gotFILTER()?FILTER()will do =)