Ask Your Question

How do I indicate in 1 cell the equivalent of: =IF A2>0, A2*$A$1 or IF B2>0, B2*$B$1?

asked 2018-05-03 16:05:37 +0200

This formula obviously doesn't work, but I need to know what will!

edit retag flag offensive close merge delete


  • =IF (A2>0;A2$A$1;IF (B2>0;B2$B$1))


  • =IF (A2>0;A2$A$1;IF (B2>0;B2$B$1;""))


Grantler gravatar imageGrantler ( 2018-05-03 16:24:46 +0200 )edit

The question is incomplete or misleading. There are neither complete alternatives nor an explanation about the role of the "or".
@KentonB: Please try to ask clear questions with sufficiently complete explanations. This site is not made to grant everyone his personal tutorial or optimised lessons about LibreOffice.

Lupp gravatar imageLupp ( 2018-05-03 16:40:22 +0200 )edit

@Grantler: You need to apply the tool for inline code to get displayed special characters (the asterisk e.g.) otherwise interptreted as layout commands.

Lupp gravatar imageLupp ( 2018-05-03 16:42:35 +0200 )edit

1 Answer

Sort by » oldest newest most voted

answered 2018-05-03 16:48:16 +0200

Lupp gravatar image

updated 2018-05-03 16:49:17 +0200

The IF() function expects three parameters: =IF(Condition; ThenExpression; ElseExpression). There are specifications what IF() should return if the ElseExpression is missing or even the ThenExpression is also missing, but it's not recommendabel to rely on these except in very special cases where you know very exactly what you want to achieve by these garbled function calls.

The standard parameter delimiter of LibreOffice correctly interpreted under any locale is the semicolon.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2018-05-03 16:05:37 +0200

Seen: 98 times

Last updated: May 03 '18