Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Number Format
Hi
Just a little formula error (look at the parenthesises): OnProdOrd = (Cells(x, 10) - Cells(x, 11)) / Cells(x, 9) Regards, Per "DG" skrev i meddelelsen ... 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Replace million-billion number format to lakhs-crores format | Excel Discussion (Misc queries) | |||
convert text-format number to number in excel 2000%3f | Excel Discussion (Misc queries) | |||
Number format based on number format of another cell in another workbook | Excel Programming | |||
How do i change numbers in text format to number format? | New Users to Excel | |||
excel format cells/Number/Category: Number problem | Excel Discussion (Misc queries) |