ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   data entry currency as cents if entering 2 numbers (https://www.excelbanter.com/excel-discussion-misc-queries/175323-data-entry-currency-cents-if-entering-2-numbers.html)

Nonie

data entry currency as cents if entering 2 numbers
 
Hi there,

I want excel to return "$.59" if I type in "59" and "$1.59" if I type in
"159"

Is there a way to do this?

Thanks!

Nonie

data entry currency as cents if entering 2 numbers
 
Sweet! Thanks so much - it worked perfectly!

"Jim Thomlinson" wrote:

Tools - Options Edit - Check fixed decimal places (ensure the number is 2)
--
HTH...

Jim Thomlinson


"Nonie" wrote:

Hi there,

I want excel to return "$.59" if I type in "59" and "$1.59" if I type in
"159"

Is there a way to do this?

Thanks!


Gord Dibben

data entry currency as cents if entering 2 numbers
 
Just remember this is a global setting and will affect all workbooks and sheets.

You may want sheet event code which toggles this setting when you activate or
deactivate a particular sheet.

Private Sub Worksheet_Activate()
Application.FixedDecimal = True
End Sub

Private Sub Worksheet_Deactivate()
Application.FixedDecimal = False
End Sub

This is event code and goes into the sheet module.

Right-click on a sheet tab and "View Code"

Copy and paste the code into that module.

If you want the 2 DP on just a range of cells on one sheet you would need a
different event code tailored for a range.


Gord Dibben MS Excel MVP

On Fri, 1 Feb 2008 13:27:28 -0800, Jim Thomlinson
wrote:

Tools - Options Edit - Check fixed decimal places (ensure the number is 2)




All times are GMT +1. The time now is 01:50 AM.

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