Sum with variable in VBA macro
DEN91
-
Loumie64 -
Loumie64 -
Hello,
I have a small issue with performing a simple addition of a certain number of cells in the same column using a variable.
The number of cells may vary with each execution of the macro.
For example:
I want to sum from cell D2 to cell Dx (where x is my variable) and have the total in cell Dx +1.
At the beginning of my macro, I initialize the variable but after that, I can't seem to reuse that same variable in the sum function that I want to perform.
Thank you for your help...
I have a small issue with performing a simple addition of a certain number of cells in the same column using a variable.
The number of cells may vary with each execution of the macro.
For example:
I want to sum from cell D2 to cell Dx (where x is my variable) and have the total in cell Dx +1.
At the beginning of my macro, I initialize the variable but after that, I can't seem to reuse that same variable in the sum function that I want to perform.
Thank you for your help...
Configuration: Windows XP Internet Explorer 6.0