Simple Multiplication Formula
I've been searching google for some time now and cant' find the answer
This is probably too simple a question
I'm trying to write a function that will put a formula in ResultCol to
multiply InputColOne times InputColTwo
Public Function MultiplyCells(RowIdx As Long, ColOne As Long, ColTwo As
Long, ResultCol As Long, oWs As Worksheet) As Boolean
oWs.Cells(RowIdx, ResultCol).FormulaR1C1 = oWs.Cells(RowIdx, ColOne).Value
* oWs.Cells(RowIdx, ColTwo).Value
End Function
I'm sure my syntax is wrong, I don't clearly understand the .FormumaR1C1
method...
It's not throwing an error, but it's putting the value in the result cell,
not the formula
any hints?
Thanks Mark
|