# Matching Index of Repeated Dates

#### S P P

##### Member
Matching Index of Repeated Dates

Corresponding index of table1 in table2 same date without repeating

#### Attachments

• Matching Index of Repeated Dates.xlsx
40.4 KB · Views: 10
Your explanation is very very succinct... Whats is your logic ? ( BTW, "Hello" or " Thank you" are not considered to be offensive)

What you have presented looks like a filter.
Code:
``= FILTER(Tabela1, (MONTH(Tabela1[Date])=month) * (YEAR(Tabela1[Date])=year))``

Of course, provided you use 365, it is always possible to simplify the worksheet at the expense of more complex function
Code:
``= FilterByMonthλ(Tabela1, Tabela1[Date], month, year)``
where
Code:
``````FilterByMonthλ
=LET(
Criterion1?, MONTH(CritDateArr) = CritMnthVal,
Criterion2?, YEAR(CritDateArr)  = CritYrVal,
Required?, MAP(Criterion1?, Criterion2?, ANDλ),
FILTER(Array, Required?)
)

ANDλ
= AND(x, y)``````

#### Attachments

• Matching Index of Repeated Dates.xlsx
51.3 KB · Views: 4
Peter Bartholomew

Thanks for the collaboration

Your formula only works on 365, but I'm using 2019.

I'm going to have to do a userform filter between two dates.

Power Query at cell J2. Should work in Excel 2019.
Adjust year and month in cells E3 and E5 (both named ranges) and right click the results table and choose Refresh.

ps. perhaps the dates in column B shouldn't also rely on E5?!

#### Attachments

• Chandoo54583Matching Index of Repeated Dates.xlsx
53 KB · Views: 1
I managed to make the filter in userform , but it is working only in the worksheet with the data.

Can you help me with this vba

#### Attachments

• Matching Index of Repeated Dates (2).xlsm
67.9 KB · Views: 1
I also managed with excel 2019 using this formula

#### Attachments

• SPP Matching Index of Repeated Dates 2019.xlsx
43.9 KB · Views: 7