View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Roger Govier[_10_] Roger Govier[_10_] is offline
external usenet poster
 
Posts: 15
Default Calculation Problem

Hi Tempy

Multiplication takes precedence over subtraction.
You are taking 4 x 2185.79 away from 2185.79.

Change to

ActiveCell.FormulaR1C1 = "=(RC[-2]-RC[-1])*RC[-4]"

Regards

Roger Govier


Tempy wrote:
Good day all, i have a calculation below which calculates the following,
Cells G - H x E = result should be "0"

G = 2185.79
H = 2185.79
E = 4

However i get a result of -6557.37 ??

ActiveCell.FormulaR1C1 = "=RC[-2]-RC[-1]*RC[-4]"

Could somebody please give me some help with this.

thanks in advance.

Tempy

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