Use if ... then ... else in Calc formula
I am working on a sheet that helps check my account activities.
How can I make Column "G7(NIP)" display 53.75 if value in Column "E7(Debit)" is greater than or equal to 50000; display 16.13 if less than 50000, or display "0" if empty?
Thanks in anticipation and I hope I am clear enough.........
And what to display for 50000 (of "0" is for empty)? or is the title more correct, saying "else 0", meaning 50000 must result in display of 0?
try 'nested ifs', like '=IF(B3="";0;IF(B3>50000;53,75;IF(B3<50000;16,13;"undefined")))',
german locale, you'll need '.' instead of ',' and ',' instead of ';',
observe the changed order - hierarchy for the if's - needed to avoid empty cells being interpreted as '0' and thus catched by the range <50.000,
and for 50.000 you'll get 'else-else-else' and thus 'undefined',
if you want a value for 50.000 replace 'undefined', or - if 50.000 belongs to one of the ranges - try '>=' for '>' or '<=' instead of '<', or you may shorten the formula to two if's,
be careful regarding 'entered values' vs. 'calculation results' in col. E, 'empty' or "" is different to '0', even if the 0 isn't shown reg. the setting of 'display - zero values',
or - in other words - be aware that '0' as well as all negative values belong to the ...(more)
I'll edit the question.
It is "if E7>=50000"
50000 and above attracts 53.75 while E7<50000 attracts 16.13.
Thanks
Next time, please keep the question text short so that it doesn't clog the questions overview.