Forum Discussion
matt0020190
Nov 10, 2020Brass Contributor
Copy data from one table to another ordered by date
Hi everyone, Hope you are well. I get by in excel and able to use the most formulas for my needs. However this one has stumped me. I have a table with employee details within. I basically...
SergeiBaklan
Nov 11, 2020Diamond Contributor
- matt0020190Nov 11, 2020Brass ContributorThanks - this is the type of formula I was looking for - however it actually only delivers the same as my own formula above. Your example does not filter the table by date the employee left. I would have to use a macro to autofilter or manually sort. Am I missing something?
- SergeiBaklanNov 11, 2020Diamond Contributor
If with sorting that could be
=LET( range, A1:INDEX(B:B,COUNTA(A:A)), allLeaveDates, B1:INDEX(B:B,COUNTA(A:A)), rangeWithLeaves, FILTER(range,allLeaveDates<>""), dates, INDEX(rangeWithLeaves,0,2), sortedRange, SORTBY(rangeWithLeaves,dates,-1), sortedRange)