data entry currency as cents if entering 2 numbers

  • Thread starter Thread starter Nonie
  • Start date Start date
N

Nonie

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!
 
Sweet! Thanks so much - it worked perfectly!

Jim Thomlinson said:
Tools -> Options Edit -> Check fixed decimal places (ensure the number is 2)
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top