This is to copy 12 months of data from Data history sheet, only when the date in K2 match to the column or beyond until the data exists.
What I mean is that when you enter 2018/12/1, it will not change due to 2018/21/1 back 11 month is Jan, but you only have from Feb.
Also if the data in K2 exceeds the max of date in Data history sheet, it will not change.
So in you attached workbook,it only updates if the date in K2 is 2019/1/1 to March.
To Report view sheet code module
Forgot to mention:
You need to change the formula in Row 5 to value like attached
Bookmarks