This should work in 2021...

In B164, enter

=AVERAGE(TAKE(DROP(TAKE(UNIQUE(FILTER($A$2:$F$163,$E$2:$E$163<>"")),-4),,COLUMN(B164)-1),,1))

and copy to C, E, and F....