Hi everyone!
Just wanted to share something... I've been trying to figure out the custom grade calculations for almost an entire afternoon now, and I did it! I figured out what was off.
It seems that you should use ";" instead of "," to separate the arguments in a function, in order NOT to get the invalid formula error. At least, if you're using Portuguese language settings in Windows...
Peace!