I have 1 table named table1. It has multiple columns. I have another table named table2 where I want to fill a column with column header named ColB using a formula referencing to the cells in table1 with column header named ColA. table1 looks like this:
<code style="margin: 0px; padding: 0px; border: 0px; font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, sans-serif; white-space: inherit;"> ColA ...
---------------
1
2
3
4
5
.
.
.</code>The column ColB I want to fill has a formula, where each cell references multiple rows to table1, ColA. The formula for the 1st row of the ColB in table2 is simply a sum operation like this: (ColA row 1) + (ColA row 2) + (ColA row 3). And the formula for the 2nd row of ColB in table2 will follow as (ColA row 2) + (ColA row 3) + (ColA row 4), the rest of the column should follow this pattern.
I do not want to use cell references like for eg. A1, A2, C3... Is there a way to do this without using loop in VBA? Although I am using VBA, I want to simply apply the first formula in the first row of ColB, then autofill the formula throughout the ColB.
<code style="margin: 0px; padding: 0px; border: 0px; font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, sans-serif; white-space: inherit;"> ColA ...
---------------
1
2
3
4
5
.
.
.</code>The column ColB I want to fill has a formula, where each cell references multiple rows to table1, ColA. The formula for the 1st row of the ColB in table2 is simply a sum operation like this: (ColA row 1) + (ColA row 2) + (ColA row 3). And the formula for the 2nd row of ColB in table2 will follow as (ColA row 2) + (ColA row 3) + (ColA row 4), the rest of the column should follow this pattern.
I do not want to use cell references like for eg. A1, A2, C3... Is there a way to do this without using loop in VBA? Although I am using VBA, I want to simply apply the first formula in the first row of ColB, then autofill the formula throughout the ColB.