help with variable division

G

Gary Keramidas

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?
 

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

Similar Threads


Top