Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
help with variable division
i am using 2 variables, tmpWt and tmpTime. weight is in pounds, time is in
minutes. they are both dimmed as double the 2 variables always have to correct values, yet when i try to divide the weight by the time, the number is always a whole number and it's always wrong. for example: tmpwt = 2000 tmpTime = 23.5294 ws2.Range("P" & nextRow).Value = tmpWt \ tmpTime the value in the cell is 83.00 the correct answer is 85.00 another one: tmpwt =120 tmpTime =1.666 the cell value is 60.00 the correct value is 72.28 i can put the variable values in cells adjacent to column P and they're right, but the division is incorrect. anyone know why? -- Gary |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
help with variable division
i found a stupid mistake, in one formula i had \ instead of /.
sorry. -- Gary "Gary Keramidas" <GKeramidasATmsn.com wrote in message ... i am using 2 variables, tmpWt and tmpTime. weight is in pounds, time is in minutes. they are both dimmed as double the 2 variables always have to correct values, yet when i try to divide the weight by the time, the number is always a whole number and it's always wrong. for example: tmpwt = 2000 tmpTime = 23.5294 ws2.Range("P" & nextRow).Value = tmpWt \ tmpTime the value in the cell is 83.00 the correct answer is 85.00 another one: tmpwt =120 tmpTime =1.666 the cell value is 60.00 the correct value is 72.28 i can put the variable values in cells adjacent to column P and they're right, but the division is incorrect. anyone know why? -- Gary |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Need help with division, please!!! | Excel Worksheet Functions | |||
Division | New Users to Excel | |||
Division help? | Excel Discussion (Misc queries) | |||
Division help? | Excel Discussion (Misc queries) | |||
Division By Zero | Excel Worksheet Functions |