Case

Let's say we need to test for a lot of specific values. You would have to write alot of if/else statements. Or you could just use a case statement. Like this:

alt text

Here we are testing for several different prices. When it finds the value that corresponds to the current value of Price then it executes only the code for that case.

This is the exported spreadsheet with the results:

alt text


Previous section:
Next section: