R
RealInfo
Hi all
Is it OK to include excell functions into VBA code ?
Thanks
EC
Is it OK to include excell functions into VBA code ?
Thanks
EC
Shane Devenshire said:Hi
Assuming you are just asking "can" you do this, the answer is yes. Many
ways, but we need to know what it is you are doing to be more helpful.
Here are three examples
ActiveCell = "=SUMIF(R[-11]C[-2]:R[-2]C[-2],2,R[-11]C:R[-2]C)"
ActiveCell = "=SUMIF(A12:A21,2,C12:C21)"
x = WorksheetFunction.SumIf(Range("A12:A21"), 2, Range("C12:C21"))
The first two put the sumif function into the activecell the third one
stores the result of a sumif calculation in a variable.
--
If this helps, please click the Yes button.
Cheers,
Shane Devenshire
RealInfo said:Hi all
Is it OK to include excell functions into VBA code ?
Thanks
EC