by **RusselB** » Sat Dec 14, 2019 7:07 pm

Welcome to the Forums.

You could get the smaller of the two numbers by using the VLOOKUP function, with a formula like

- Code: Select all Expand viewCollapse view
`=VLOOKUP(D1;A2:A19;1)`

Please note that this will return the exact match if the number you enter in D1 is in the range A2:A19

I'm having a harder time getting something that returns the greater value...but I'll keep at it... in the mean time, there's a start.

This formula

- Code: Select all Expand viewCollapse view
`=INDIRECT(ADDRESS(RANK(D4;A2:A19;1)+2;1))`

seems to work for returning the higher of the two numbers you were wanting

OpenOffice 4.1.7 and LibreOffice 6.3.3.2 on Windows 7 Pro & Ultimate

If you believe your problem has been resolved, please go to your first post in this topic, click the Edit button and add [Solved] to the beginning of the Subject line.