repetition - Repeating a several numbers a set number of times in VBA -
i have column of 47 numbers in column in spreadsheet. in sheet want numbers transposed row. did using code
worksheets.add(before:=worksheets(1)).name = "calc" dim k integer k = 1 47 worksheets("calc").cells(1, k).value = worksheets("reformulering").cells(k + 1, 2).value next k
however, want each number repeated 12 times in row before next number comes. can think of method this?
best,
id
yes, add loop runs 1 untill 12 this:
worksheets.add(before:=worksheets(1)).name = "calc" dim k integer dim integer k = 1 47 = 1 12 worksheets("calc").cells(1, ((k - 1) * 12) + i).value = worksheets("reformulering").cells(k + 1, 2).value next next k
Comments
Post a Comment