Using either of these worked for me:
Sub DumpFormula()
Dim rngCell As Range
For Each rngCell In Sheet1.Range("A1", "J10"

rngCell.Formula = "=M1*M2/M3+M4-M5"
Next
End Sub
Sub DumpFormulaAgain()
Dim rngCell As Range
For Each rngCell In Sheet1.Range("A1", "J10"

rngCell.Value= "=M1*M2/M3+M4-M5"
Next
End Sub
Does your formula contain quotes?
Example: =IF(ISTEXT(M1),"Text",IF(ISBLANK(M1),"Null","Number"

)
If so, you would have to construct the VBA code for the formula a little differently.
Example: rngCell.Value = "=IF(ISTEXT(M1)," + Strings.Chr(34) + "Text" + Strings.Chr(34) + _
",IF(ISBLANK(M1)," + Strings.Chr(34) + "Null" + Strings.Chr(34) + _
"," + Strings.Chr(34) + "Number" + Strings.Chr(34) + "

)"
Both examples worked for me.
Hope this helps,
Pete