Home » excel » excel – case statement in a spreadsheet

excel – case statement in a spreadsheet

Posted by: admin May 14, 2020 Leave a comment


what i am trying to accomplish here is pretty straight forward, i have a column fare in my spreadsheet and i want to add anew column that would say if the fare is <10 ,10<20,20<30,30+

I came up with this solution but it seems like it is not using a shortcut condition, is there a case statement or any other method i can use to achieve what i want?


How to&Answers:

Try something like this:



Since the conditions in a nested set of if functions are evaluated consecutively, you do not need to repeat previous conditions using and. Also note that your original formula doesn’t do the right thing at the borderlines, e.g. if J19=10.

So although Excel does not have a case function, the following is simpler and more accurate than your original: