How can I add a function in LibreOffice Calc so that values of cells would not exceed calculated value of 20?

I have spreadsheets calculating assumed development of some attributes. The value of an attribute should’t exceed 20 but in some cases the development is so good it goes over the limit. How can I add there a function or something that limits all the values too high to appear as 20?

Just use an IF function.

E.g. =IF(A1>20;20;A1)

This means “If value in A1 is greater than 20 show the value 20 otherwise use the value in A1”

Hope this is what you asked :slight_smile:


I’m pretty sure that is exactly what I’m looking for. But it seems I need to ask another question and that is:

If I already have a function like this for the cell


how can I add the IF function there without getting error messages?

Thank you for your quick response!


Just repeat the function as in =IF((Chart1.A2/Chart1.A1)xB1>20;20;(Chart1.A2/Chart1.A1)xB1) or even more elegant =MIN(20;(Chart1.A2/Chart1.A1)xB1) as suggested by @Karolus

Note: I had to replace asterisk with x because in comments it is used to convert text to Bold…

Gotcha! Thanks a million for your help!