These formulae are really great. I'd just like to clarify something though. When you say max(level,20) what do you mean? Do you mean e.g. max at level 20, or the max at that level or 20 whichever is higher? I'm new to the theory stuff so apologies if this is a daft question.
Max() is a spreadsheet function that outputs the maximum value in a list. In this case the list is only 2 items long. For example you have a level 12 toon, max(level,20) will output 20. Versus a level 33 toon, max(level,20) will output 33.