Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
currency Problem | Excel Worksheet Functions | |||
Is there a way to round currency? | Excel Discussion (Misc queries) | |||
Currency formating problem | Excel Discussion (Misc queries) | |||
Currency formating problem | Excel Discussion (Misc queries) | |||
I am trying to round currency to the closest .50, can anyone tell. | Excel Discussion (Misc queries) |