I like to perform simple calculation on data in a column, but use only selected rows. If I use the Command Window I can do: col(C)=90-col(B) which will perform the calculation on all rows. I want the calculation on every 3rd row, i.e. 1st, 4th, 7th ... and the other data should be just copied as they are. I tried: for (ii =1; ii <=wks.maxrows; ii +=3) {col(3)=90-col(2)[ii]} but this gives a constant value in the 3rd column. Can anyone help? Thanks.
Edited by - EmiliaSeltsam on 04/29/2020 6:01:14 PM
yes, it basically works. I cleared col(3) and then performed the script, and it does the calculation on every 3rd row. But it does not copy the other data from col(2). My workaround is to copy col(2) to col(3) and then run the script, which gives me what I want. THANKS A LOT.