Number Format

  • Thread starter Thread starter DG
  • Start date Start date
D

DG

I have a macro with the following formula

OnProdOrd = (Cells(x, 10) - Cells(x, 11) / Cells(x, 9))

I'll use x = 1 for the example

Cells(1,10) = 10
Cells(1,11)= 0
Cells(1,9)= 0.5
The problem is that in Cell(x,9) the value is 0.5. But the program must be
rounding to 1 or making it an integer because OnProdOrd = 10 when it should
be 20 (10 - 0)/0.5.

How do I correct this?

Dan
 
Hi

Just a little formula error (look at the parenthesises):


OnProdOrd = (Cells(x, 10) - Cells(x, 11)) / Cells(x, 9)

Regards,

Per
 
Back
Top