Quantcast
Channel: Hot Weekly Questions - Web Applications Stack Exchange
Viewing all articles
Browse latest Browse all 9844

Case statements in SWITCH statements in Google Sheets

$
0
0

I'm updating a Google Sheet. In that Google Sheet, I need to display a student's grade based on specific cut offs. I thought a SWITCH statement would be the correct approach. However, based on that documentation, it looks like the case statements are mappings instead of conditionals. This seems incorrect. I feel like I'm misunderstanding something. At this time, I have the following SWITCH statement.

=SWITCH(85, 85<=60, "F", 85<=70, "D", 85<=80, "C", 85<=90, "B", 85<=100, "A", "Unknown")

85 is the value in a cell. I manually put it in to debug. However, this statement always results in "Unknown". Is there a way to use conditional statements in a SWITCH statement?

Thank you.


Viewing all articles
Browse latest Browse all 9844

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>