• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Matching Index of Repeated Dates

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

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

Back
Top