View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
sasha sasha is offline
external usenet poster
 
Posts: 2
Default Help with taking formula to vba code


alok,

thanx a lot, that ws a gr8 explanation. u guys rock

But when I put this formula, not the calculated value is appearing but
this =(10*$D8+7*$E8+4*$F8+$G8)/($D8+$E8+$F8+$G8)

The string itself!!!!

Heres my function

Sub CalculateFormula(ByVal source As Integer, ByVal Dest As Integer)
With wsData
With .Range(.Cells(source, 9),
.Cells(Dest,9)).FormulaR1C1 =
"= (10*RC4+7*RC5+4*RC6+RC7)/(RC4+RC5+RC6+RC7)"
End With
End With
End Sub


*** Sent via Developersdex http://www.developersdex.com ***