Join the Alteryx Community’s Maveryx Summer Cup event! Compete, network with others, and earn your gold through a series of challenges from July 24th to August 11th. Learn more about the event here.

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.

Derive Excel Column Letter from Column Number

Carluccio555
9 - Comet

Hoping there is a simple-ish formula expression to accomplish this eg, if the input is '26' the output is 'Z' if the input is '52' the output  is 'ZZ'

 

Thanks

11 REPLIES 11
cjaneczko
13 - Pulsar
Carluccio555
9 - Comet

Thanks, I did google and find this but I'm sure this can be done without a batch macro using expressions. Looking for such a solution,

 

I assume this can be done by dividing the column number by 26 and then referring in some way to the string 'abcdefghijklmnopqrstuvwxyz'

caltang
17 - Castor
17 - Castor

Hey there. 

I know this is 4 weeks old but I had the exact same question as you did @Carluccio555 

 

The link that @cjaneczko sent is good, but Alteryx has already changed that page into a Community knowledge post without the attachment. @AlteryxCommunityTeam would you kindly take a look at the link and re-attach the macro? 

But for now, @Carluccio555 you can use:

CharFromInt([YourNumber] + 64). 

If your first number is 1, adding 64 = 65. CharFromInt converts that into A. 2 gets you B, 3 nets you C, and so on so forth. Now once you hit 26 letters, you’ll need to reset by subtracting 26 and then concatenate the field once more to get AA, AN, AC, etc. 

Hope this helps in the interim.

Calvin Tang
Alteryx ACE
https://www.linkedin.com/in/calvintangkw/
caltang
17 - Castor
17 - Castor

Like so:

image.png

Calvin Tang
Alteryx ACE
https://www.linkedin.com/in/calvintangkw/
cjaneczko
13 - Pulsar

You can still download the macros on the attachment.

 

image.png

caltang
17 - Castor
17 - Castor

That’s odd, I see nothing down there… thanks @cjaneczko ! 

Calvin Tang
Alteryx ACE
https://www.linkedin.com/in/calvintangkw/
caltang
17 - Castor
17 - Castor

I see this: https://knowledge.alteryx.com/index/s/article/Generating-Excel-Column-Letters-in-Alteryx-15834609087...

 

That’s why I was puzzled to your statement. Thanks for finding the original post @cjaneczko !

Calvin Tang
Alteryx ACE
https://www.linkedin.com/in/calvintangkw/
cjaneczko
13 - Pulsar

Very odd. This is what I show when i click on the link in my post.

 

 

image.png

AndrewDMerrill
13 - Pulsar

@Carluccio555, @caltang 

Here is another workflow that takes a number and outputs the corresponding Excel Column name associated with it! All without macros:

Screenshot.png

Labels