0

I'm trying to get the name of a field on a map (C12, B0, H5...).

I know where my target is (12th row, 5th column), but how do I turn the 5th column into E and end up with E12?

Talha Tayyab
  • 8,111
  • 25
  • 27
  • 44
  • 2
    `String.fromCharCode('A'.charCodeAt(0) + row - 1)` – Barmar Jun 12 '22 at 17:54
  • @Barmar How about AB31? – václav kočenda Jun 12 '22 at 17:57
  • 1
    You'll need to check if the row number is higher than 26, then get the quotient and remainder to make multi-letter rows. But once you have each part, you still use the same formula to turn it into a letter. – Barmar Jun 12 '22 at 17:59
  • Does this answer your question? [convert number to letter javascript](https://stackoverflow.com/questions/13201994/convert-number-to-letter-javascript) – yurloc Jun 12 '22 at 19:46

0 Answers0