Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Formatting calculated field

Status
Not open for further replies.

Grieve1

Programmer
Jun 11, 2008
33
GB
Hi I have a value from a Dlookup displayed as 345.134566 and I want it to just have 2 decimal places. I have tried different formatting and the only one I get to work is Ccur but I don't want currency formatting. Can anyone help. Thanks for your continuing support
 
You can use Round or a custom format, which you choose depends on what the number means and what you want to do with it.

"The Round function performs round to even, which is different from round to larger." -- Microsoft

Debug.Print Round(19.955, 2)
'Answer: 19.95

Debug.Print Format(19.955, "#.00")
'Answer: 19.96
 
Thanks Remou for your quick reply Format worked a treat
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top