samedi 29 juin 2019

Use IF with multiple ELSEIF and ELSE in a spreadsheet cell

I am trying to make this statement applicable to some cells in my google spreadsheet :

if ((B29 - B36) > 0) {
    (B29 - B36) * (D36 / 100) + F35 + F34 + F33
} else if  ((B29 - B35) > 0) {
    (B29 - B35) * (D35 / 100) + F34 + F33);
} else if (B29 - B34 > 0) {
    (B29 - B34) * (D34 / 100) + F33);
} else {
    0
}

I tried to make it with only IF, but the cells didn't like the syntax :

=IF((B29 - B36) > 0);((B29 - B36) * (D36 / 100) + F35 + F34 + F33);IF((B29 - B35) > 0);((B29 - B35) * (D35 / 100) + F34 + F33);IF((B29 - B34) > 0);((B29 - B34) * (D34 / 100) + F33);0

How can I achieve this?

Aucun commentaire:

Enregistrer un commentaire