S
Stu W
I've got a program that I've created in Excel using VBA. I'm creating some
calculations from sheets that are imported from elsewhere. I'm needing to
create a sum formula on the worksheet. The column and row reference for
where this formula will be placed will differ by worksheet. I'm using some
variables like mCol and mRow to keep track of which column and row I'm doing
stuff on. These variables are tracking the column and row reference by index
number, not by the letter identifier of the column.
Now, I'm at the point where I'm having to place a sum function in a cell,
except that I need the sum function to add up all of the cells above it. So,
for example, if the sum formula goes into C25, I want it to place a formula
that will go into cell C25, something like sum(c1:c24). But I'm using index
numbers instead of column letters to track which column I'm doing this in.
So, mCol = 3 and mRow = 25.
I can't figure out how to construct the sum formula using my index variables.
calculations from sheets that are imported from elsewhere. I'm needing to
create a sum formula on the worksheet. The column and row reference for
where this formula will be placed will differ by worksheet. I'm using some
variables like mCol and mRow to keep track of which column and row I'm doing
stuff on. These variables are tracking the column and row reference by index
number, not by the letter identifier of the column.
Now, I'm at the point where I'm having to place a sum function in a cell,
except that I need the sum function to add up all of the cells above it. So,
for example, if the sum formula goes into C25, I want it to place a formula
that will go into cell C25, something like sum(c1:c24). But I'm using index
numbers instead of column letters to track which column I'm doing this in.
So, mCol = 3 and mRow = 25.
I can't figure out how to construct the sum formula using my index variables.