I don’t have Excel, but I crossed my fingers and tried it in Numbers (Mac).
Unfortunately it thought all my commands (even “x”) were too many words, haha.
So cool that you managed this, though! The next time I’m near a PC, I’ll give it a shot! My brother isn’t an IF person at all, but he uses Excel a lot for work. I might sent it his way too, just for fun. :)