Home > Blockchain >  How to get incremental values of alphabets in a range of a number?
How to get incremental values of alphabets in a range of a number?

Time:04-20

For example I have number 3.

I want a range that gives me A, B, C.

I can't think of a way to do this in excel even getting the range 1, 2, 3. Thanks.

CodePudding user response:

Using SEQUENCE and the dynamic array formula:

=TEXTJOIN(", ",,CHAR(SEQUENCE(,A1,65)))

This will work till "Z"

enter image description here

If one needs to go beyond "Z" we can use:

=TEXTJOIN(",",,SUBSTITUTE(ADDRESS(1,SEQUENCE(A1),4),"1",""))

Or as JvdV showed:

=SUBSTITUTE(TEXTJOIN(",",,ADDRESS(1,SEQUENCE(A1),4)),"1","")

Which probably will reduce the calculations.

Just note that the use of ADDRESS makes this volatile and it will recompute every time Excel has a change.

  • Related