Convert number to alphanumeric

Convert number to alphanumeric

Hi,

I have written my own custom function to convert a number to an alphanumeric code but am having some difficulty since my brackets keep moving and when I call my function, it does not always produce the intended result but the first time I ran it, it was fine.

Does anyone know the best way to convert an number to base 36?

eg 1=> 1
11 =>A
2000 => 1JK