Skip to content
Advertisement

How to generate the last letter of a google sheet column given the first letter and an array of data?

Now my approach is to generate only one letter, but if there is a lot of data and it comes after column Z, my code breaks.

Working code that will give a, d:

JavaScript

Non-working code, in this case I want to get z, ac.

JavaScript

Some inputs and wanted result:

JavaScript

Advertisement

Answer

You could take two functions to get an integer value from a string and a string from an integer value.

With this functions, you could adjust the numerical value and get an encoded string of this value.

JavaScript
JavaScript
User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement