Filter data using array formulas
It is a simple matter to filter the data using a formula in reverse order, much more complex to have automatic row removal and determine appropriate logic. I have filtered based on the order
(as you wished) however comparing the actual date time
would be a more reliable approach to determine the newest entry
instead of the order
which can be accidentally changed and would be impossible to restore in it's absence unless you add an index
of some sort.
MS Excel
Cell D2:
=SORT(UNIQUE(FILTER(A:A,(A:A<>"")*(A:A<>A1))),1)
Cell E2:
=BYROW(FILTER(D:D,D:D<>""),LAMBDA(d, INDEX(B:B,XMATCH(d, A:A,, -1))))
Google Sheets
Cell D2:
=SORT(UNIQUE(A2:A),1,1)
Cell E2:
=BYROW(FILTER(D2:D,D2:D<>""),LAMBDA(d, INDEX(B:B,XMATCH(d, A:A,, -1))))
Sample Data
A B C D E
|------------|-------|---|------------|------------|
1 | Duplicates | Value | | Unique | Last Value |
|------------|-------|---|------------|------------|
2 | 10/1/2022 | 1 | | 10/1/2022 | 111 |
|------------|-------|---|------------|------------|
3 | 10/20/2022 | 5 | | 10/20/2022 | 18 |
|------------|-------|---|------------|------------|
4 | 10/20/2022 | 23 | | 10/23/2022 | 23 |
|------------|-------|---|------------|------------|
5 | 10/20/2022 | 18 | | 10/27/2022 | 27 |
|------------|-------|---|------------|------------|
6 | 10/27/2022 | 27 | | | |
|------------|-------|---|------------|------------|
7 | 10/1/2022 | 11 | | | |
|------------|-------|---|------------|------------|
8 | 10/23/2022 | 23 | | | |
|------------|-------|---|------------|------------|
9 | 10/1/2022 | 111 | | | |
|------------|-------|---|------------|------------|