Jimbo99999
asked on
VB.Net - Excel Sum Column Values Referencing Column With A Variable
Good Day Experts!
I am having a bit of trouble here trying to figure out my SUM formula using variable for the column. I can figure it out with a variable for the row end.
This works if I hard code the Column:
oSheet.Cells(DataRow + 2, ColumnStart).Formula = "=SUM(C7:C" & (DataRow) & ")"
Is it possible to use variable on Column reference?
Thanks,
jimbo99999
I am having a bit of trouble here trying to figure out my SUM formula using variable for the column. I can figure it out with a variable for the row end.
This works if I hard code the Column:
oSheet.Cells(DataRow + 2, ColumnStart).Formula = "=SUM(C7:C" & (DataRow) & ")"
Is it possible to use variable on Column reference?
Thanks,
jimbo99999
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I have just noticed that I have an extra .Formula in the number part. This should be removed.
ASKER
It is working now!
Thanks for helping.
I have several other Excel formatting things I will need to be doing, but this is good to get it out of the way.
Thanks again,
jimbo99999
Thanks for helping.
I have several other Excel formatting things I will need to be doing, but this is good to get it out of the way.
Thanks again,
jimbo99999
ASKER