Thread: Number Format
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
DG DG is offline
external usenet poster
 
Posts: 46
Default Number Format

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