View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.programming
MP[_3_] MP[_3_] is offline
external usenet poster
 
Posts: 19
Default Simple Multiplication Formula

Hi Bob,
Guess since I'm new to excel, I don't have the terminology straight...
I thought my intent was to place a formula into the cell.

I was thinking when I put in a cell (for example manually type the
following) "= somecelladdress * othercelladdress" that I was entering a
formula...?

....because I can then copy that cell content, and paste special...

if I select Formula I get the "formula" (adjusted per row/col)
if I select Value, I get the resultant value of the formula, but not the
formula itself.

So maybe I'm confusing the terms somehow???

Any way, both .Value and .Formula appear to place the same 'contents' into
the target cell, which is exactly what i'm looking for.

So thanks again to both of you for your inputs.
Mark



"Bob Phillips" wrote in message
...
But it is a value not a formula. Formula might work, but Value helps
explain the intent

Public Function MultiplyCells(RowIdx As Long, _
ColOne As Long, _
ColTwo As Long, _
ResultCol As Long, _
oWs As Worksheet) As Boolean
With oWs
.Cells(RowIdx, ResultCol).Value= "=" & _
.Cells(RowIdx, ColOne).Address(False, False) & "*" & _
.Cells(RowIdx, ColTwo).Address(False, False)
End With
End Function

--
---
HTH

Bob