Note: You must be registered in order to post a reply. To register, click here. Registration is FREE!
T O P I C R E V I E W
antarsih
Posted - 09/25/2012 : 1:20:54 PM Hello! I have several worksheets with similar names, e.g. wks1, wks2, wks3.... Each worksheet includes several columns also with similar names, e.g. data1, data2, data3....
I am wondering if I can somehow replace number in the names with "i" and make a loop? I imagine it could be like this (but with correct syntax):
for (i = 1; i <= 5;i ++) { for (ii = 1; ii <= 10;ii ++) { wks10_results{i}=wks{i}_data{i}/wks{ii}_data{ii}; };};
I'll be grateful for help.
3 L A T E S T R E P L I E S (Newest First)
zevgdimi
Posted - 06/25/2015 : 4:21:26 PM Hello,
I have the same problem but I do not understand the proposed solution. Could you please write the whole code? To my specific problem: I have 16 columns which shall be named "Pix 1" to "Pix 16", so I would like to combine the string "Pix" with an integer increment.
Thanks
antarsih
Posted - 09/27/2012 : 6:11:04 PM Thanks, Kathy. This information is very helpful!
Kathy_Wang
Posted - 09/27/2012 : 01:04:17 AM Hi,
You could use the following syntax:
range ri = [Book1]wks$(i)!col(data$(i));
The range variable ri will be the datai column(i.e. column short name is datai) in worksheet wksi.