ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Want to get exact decimal value. (https://www.excelbanter.com/excel-discussion-misc-queries/98713-want-get-exact-decimal-value.html)

Alwyn

Want to get exact decimal value.
 
Hi,

I'm writing a macro to expedite my project work. I need little help
from you.

I'm using a multidimensional array to capture data from excel spread
sheet. The fields hold values in decimal, i.e. 33.5462 and so.

Now my concern is that when I run the following code - para_code(v_i,
h_i) = Val(ActiveCell.Value) I get an whole value, i.e. 34 instead of
33.5462.

Please let me know how to transmit the value as it is.

Thanks a lot in advance!!!


Dave Peterson

Want to get exact decimal value.
 
How did you declare para_code()?

As Double or as Long?

Alwyn wrote:

Hi,

I'm writing a macro to expedite my project work. I need little help
from you.

I'm using a multidimensional array to capture data from excel spread
sheet. The fields hold values in decimal, i.e. 33.5462 and so.

Now my concern is that when I run the following code - para_code(v_i,
h_i) = Val(ActiveCell.Value) I get an whole value, i.e. 34 instead of
33.5462.

Please let me know how to transmit the value as it is.

Thanks a lot in advance!!!


--

Dave Peterson

Alwyn

Want to get exact decimal value.
 
Oh!!!

Now i realise my mistake i had declared para_code() as integer. I can
now fix it.

Thanks a lot Mr. Peterson.
__________________________________________________ _______________________

Dave Peterson wrote:

How did you declare para_code()?

As Double or as Long?

Alwyn wrote:

Hi,

I'm writing a macro to expedite my project work. I need little help
from you.

I'm using a multidimensional array to capture data from excel spread
sheet. The fields hold values in decimal, i.e. 33.5462 and so.

Now my concern is that when I run the following code - para_code(v_i,
h_i) = Val(ActiveCell.Value) I get an whole value, i.e. 34 instead of
33.5462.

Please let me know how to transmit the value as it is.

Thanks a lot in advance!!!


--

Dave Peterson




All times are GMT +1. The time now is 02:37 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com