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: 3
Default Str to Currency round problem

Hi,
I have a problem with currency rounding (Excel automatically rounds
currency to 2 decimals).
I have an InputBox in WorkBook_Open event where user enters the currency
....

The procedure goes something like this:

currencystr = InputBox("Please enter currency: ", "Currency ¤")
If currencystr = "" Then
Msgresult = MsgBox("No currency entered ... bla bla, enter ... bla ...",
vbOKOnly,"Error")
Exit sub
Else
currency = currencystr
Sheets(1).Cells(1,1).NumberFormat = "#,##0.0000 $"
Sheets(1).Cells(1,1).Value = Currency
end if

Well, the problem is that the value in the Cells(1,1) is always rounded to
2 decimals and I need 4 !
If I enter 7,4791 Excel rounds it up to 7,5000, and if I enter 7,2319 Excel
shows 7,2300 !

I googled but couldn't find the solution ... can anyone help please ?

Thanks in advance !

--
Pozdrav
Revenger
29.01.2007 09:07:57
Jednom su proizveli Chuck Norris toalet papir, ali papir nije dopustao da
itko sere po njemu.
 
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
currency Problem irresistible007 Excel Worksheet Functions 3 February 3rd 06 08:07 PM
Is there a way to round currency? jpowers Excel Discussion (Misc queries) 1 December 27th 05 04:11 PM
Currency formating problem Jerry Excel Discussion (Misc queries) 5 February 19th 05 06:39 PM
Currency formating problem jschm1957 Excel Discussion (Misc queries) 0 February 19th 05 04:09 AM
I am trying to round currency to the closest .50, can anyone tell. sueshe Excel Discussion (Misc queries) 4 January 27th 05 08:49 PM


All times are GMT +1. The time now is 09:28 PM.

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"