T
Terry
I sincerely appreciate whoever's help on this question!
I need to use Excel formula functions of COUNTIF and SUM in VBA. The range
for calculation need to refer to a variable set in the VBA which is changing
from one worksheet to another. However, the variable can't be recognized by
the COUNTIF function. The actual statement is:
Selection.Value = "=COUNTIF(RC[1 - C]:RC[- 1], ""Abs"")"
or
Activecell.FormulaR1C1 = "=COUNTIF(RC[1 - C]:RC[- 1], ""Abs"")"
"C" is the variable set in VBA that has to be used for iteration steps in
diferrent worksheet.
How to make Excel function work by using the variable "C"?
I need to use Excel formula functions of COUNTIF and SUM in VBA. The range
for calculation need to refer to a variable set in the VBA which is changing
from one worksheet to another. However, the variable can't be recognized by
the COUNTIF function. The actual statement is:
Selection.Value = "=COUNTIF(RC[1 - C]:RC[- 1], ""Abs"")"
or
Activecell.FormulaR1C1 = "=COUNTIF(RC[1 - C]:RC[- 1], ""Abs"")"
"C" is the variable set in VBA that has to be used for iteration steps in
diferrent worksheet.
How to make Excel function work by using the variable "C"?