Calculation Problem

T

Tempy

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 ***
 
R

Roger Govier

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top