Loops to fill a table
Posted: Tue Aug 17, 2021 11:51 am
Hi, I'm trying to fill in a table, "cqestimates" with the code below. When I look at the values in the table it fills each column with the same number. It fills it with the correct value for cell (2,18), but in all of columns instead of just column 18.
Code: Select all
%quarter = "2021Q3"
group elements a b c d e f g h i j k l m n o p q
for !columns =2 to 18
for !i =1 to elements.@count
%val_name = elements.@seriesname(!i)
cqestimates(2, !columns) = @elem({%val_name}, %quarter)
next
next