I have this formula that calculates correctly the sheet1 but for some reason
it doesn't calculates the sheet2. I'd appreciate the help.



Function Projection() 'This step calculates projections, it should be
'done in both of the Sheet1 and Sheet2.

With Worksheets("Sheet1")
..Range("Q2:Q" & Cells(.Rows.Count, 8).End(xlUp).Row).FormulaR1C1 = _
"=IF(RC[-5]=0,-999999,(RC[-4]/(RC[-5]*RC[-9]))*13300)"
End With
With Worksheets("Sheet2")
..Range("Q2:Q" & Cells(.Rows.Count, 8).End(xlUp).Row).FormulaR1C1 = _
"=IF(RC[-5]=0,-999999,(RC[-4]/(RC[-5]*RC[-9]))*13300)"
End With
End Function