Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help with division, please!!! swag143 Excel Worksheet Functions 1 August 16th 06 05:01 PM
Division David New Users to Excel 5 July 26th 06 11:06 AM
Division help? clayblay Excel Discussion (Misc queries) 6 January 13th 06 02:51 PM
Division help? clayblay Excel Discussion (Misc queries) 0 January 12th 06 11:54 PM
Division By Zero carl Excel Worksheet Functions 7 September 27th 05 05:07 PM


All times are GMT +1. The time now is 04:41 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"