USING LOOKUPs but not working Libreoffice

=IF(OR(F16=0;F16="");"";(G16-IF(OR(G15=0;G15="");LOOKUP(2;1/((G$3:G14<>"")(G$3:G14<>0));G$3:G14);G15))/(F16-IF(OR(F15=0;F15="");LOOKUP(2;1/((F$3:F14<>"")(F$3:F14<>0));F$3:F14);F15))*100)

It works in MS excel but not in Libreoffice.
LOOKUP(2;1/ formula doesn’t work in Libreoffice
How should I write it in Libreoffice that will work?

Please take a look to this thread:

thank you. This formula worked.

=IF(OR(G5=0;G5="");"";(G5-MAX(G$3:G4))/(F5-MAX(F$3:F4))*100)

I was looking for the last value entered. The most recent value is the largest.