Using an expression like the minute example below, consider expecting: 0-15 returns 1, 16-30 returns 2, 31-45 returns 3, and 46-59 returns 4. It’d be much nicer to reference the variable once like with a switch, than using many nested ifs.
dateExtract({[System]Client/System/CurrentDateTime}, "minute")
MS Excel uses LOOKUP. For example:
=LOOKUP(45,{0,60,63,67,70,73,77,80,83,87,90,93,97},{"F","D-","D","D+","C-","C","C+","B-","B","B+","A-","A","A+"}) Assigns (F)
=LOOKUP(90,{0,60,63,67,70,73,77,80,83,87,90,93,97},{"F","D-","D","D+","C-","C","C+","B-","B","B+","A-","A","A+"}) Assigns (A-)
=LOOKUP(78,{0,60,63,67,70,73,77,80,83,87,90,93,97},{"F","D-","D","D+","C-","C","C+","B-","B","B+","A-","A","A+"}) Assigns (C+)