LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 160
Default Problem with the round function

Hi every1!!!

Need help understanding whats wrong with this function.
All my variables are declared as Double.

here's my code:

test = Var_clStructural * 1.65

"for this example,Var_clStructural = 4.5"

test=7.425

If i use the round like this:

test = Round(Var_clStructural *1.65,2)

I should get: 7.43, but im not and its frustrating cuz i dont see why its
rounding-up like that.

Can anyone point me in the right direction please!!!

If i asign the 7.425 to a cell, thats formated to numbers with 2 decimal im
ok,why doesnt-it work in VBA.

Thx alot for your help guys!!

PAtrick



 
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
problem with round down Chris Excel Discussion (Misc queries) 5 September 3rd 09 08:24 PM
Round() problem dindigul Excel Worksheet Functions 2 December 17th 07 04:34 PM
The ROUND function Louise Excel Worksheet Functions 3 June 23rd 05 02:45 PM
Round problem with sorting Zakar Excel Programming 0 May 6th 04 07:56 AM
VB Round( ) function Andrew[_24_] Excel Programming 10 November 13th 03 03:23 AM


All times are GMT +1. The time now is 02:04 PM.

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"