The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
 All Forums
 Origin Forum
 Origin Forum
 Get column letter from column number

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
parcomilati Posted - 08/17/2024 : 11:00:43 AM
Hi everyone,
I'm asking for help since I can't find a solution online.
Here I want to apply a formula to the column to have the auto-calculation of the values. The problem is that if I do it with the column number when new columns are inserted in between the calculation, it will not point to the right column anymore, whereas if you use the column letter, the letter in the formula row will be updated.
Here is a snippet of my code:

int a = 144;
int b = wks.ncols;

loop(ii, 1, 16){
	wcol(b+ii)[L]$ = "Voltage Variation";
	wcol(b+ii)[U]$ = wcol(a+ii)[U]$;
	wcol(b+ii)[C]$ = wcol(a+ii)[C]$;
	wcol(b+ii)[O]$ = "col($(a+ii))-col($(a+ii))[1]";


Does anyone know of a method to translate the column number to the column letter?

I really appreciate any help you can provide.

Marco

2   L A T E S T    R E P L I E S    (Newest First)
parcomilati Posted - 08/19/2024 : 10:07:43 AM
quote:
Originally posted by aplotnikov

https://www.originlab.com/doc/LabTalk/guide/string-substitution#Column_Label_Row_Information



Thank you so much, I missed it :)

Have a nice day
aplotnikov Posted - 08/19/2024 : 04:09:40 AM
https://www.originlab.com/doc/LabTalk/guide/string-substitution#Column_Label_Row_Information

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000