Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Simple Question


I have a macro that is calculating a bill, based on large numbers
(15,654,879 for example) by multiplying that large number by a decimal
(.08608). My problem is my object is not keeping the decimals, which
are crucial. The object is dimensioned as "long".

For example,

iVal = iVal * .8608 (for this case iVal = 388)

iVal returns to the sheet "33", not 33.39904, or any decimals at all.
What can I do?

Thanks in advance

Justin


--
turnerje
------------------------------------------------------------------------
turnerje's Profile: http://www.excelforum.com/member.php...o&userid=25694
View this thread: http://www.excelforum.com/showthread...hreadid=474906

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default Simple Question

i learned this today, do you have dim ival as integer? that will give a
result of 334
if you dim ival as double, it will give you the desired result, 333.9904


--


Gary


"turnerje" wrote in
message ...

I have a macro that is calculating a bill, based on large numbers
(15,654,879 for example) by multiplying that large number by a decimal
(.08608). My problem is my object is not keeping the decimals, which
are crucial. The object is dimensioned as "long".

For example,

iVal = iVal * .8608 (for this case iVal = 388)

iVal returns to the sheet "33", not 33.39904, or any decimals at all.
What can I do?

Thanks in advance

Justin


--
turnerje
------------------------------------------------------------------------
turnerje's Profile:
http://www.excelforum.com/member.php...o&userid=25694
View this thread: http://www.excelforum.com/showthread...hreadid=474906



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
IF formula-simple question; simple operator Rich D Excel Discussion (Misc queries) 4 December 6th 07 03:36 PM
Simple Simple Excel usage question BookerW Excel Discussion (Misc queries) 1 June 23rd 05 10:06 PM
Simple VBA question Aaron Excel Programming 3 January 23rd 05 06:10 PM
simple question? David New Users to Excel 1 November 25th 04 10:02 PM
simple question, hopefully a simple answer! Matt B Excel Programming 5 January 13th 04 08:43 PM


All times are GMT +1. The time now is 06:43 AM.

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

About Us

"It's about Microsoft Excel"