Complex Formulas

I have an excel spreadsheet with some complex formulas. This for example: =IF($B$13>499,C33,IF($B$13>199,C32,IF($B$13>99,C31,IF($B$13>49,C30,IF($B$13>19,C29,IF($B$13>9,C28,IF($B$13>4,C27,IF($B$13>1,C26))))))))

Essentially it applies a discount percentage from a second lower table based on how many licenses a person is buying in the top table.

I tried copying and pasting the table from excel into a Coda table, but it lost all the formulas.Is there a way to keep all the formulas when importing an excel table?

I am getting the impression that not each cell in a Coda table can include a formula - that you have to plan one formula to use only for each column. Is that correct?

Can Coda handle the complex nesting IF/Then statements like the one I have working in excel?

Hi, does something like this help? It calculates price breaks based on number of licenses purchased…

/edit - yes, you can do complex if statements like the one you describe, but you shouldn’t have to use them in the first place. :wink:

1 Like

I’ve come back to this because it’s a great example of how Coda differentiates itself from spreadsheets. Consider how much easier it is to change the price breaks or add new tiers in the Coda example than having to change that nest of ifs. :slight_smile:

Exactly.

Yes, but even better. Instead of writing that infernal IF(..., IF(..., IF(......))))) cascade, you can use a SwitchIf() function like this:

SwitchIf(
  expr1, value1,
  expr2, value2,
  expr3, value3,
  ...,
  valueElse
)
2 Likes