Apparently there *is* a UNIQUE function/formula... in version 26.2.
https://help.libreoffice.org/latest/en-US/text/scalc/01/func_unique.html
My version is version 24, that does not seem to have this, but I cannot really be sure as in the docs for 26.2 I have no way to see _where_ in the docs this function is listed at all? 
I know, send a PR or whatever but it's 2026, and your desktop app's only documentation is a website, could you please auto-expand the breadcrumbs to the currently shown page? Like srsly.