Okay, that answer raises some more questions and/or possible solutions. Note
the emphasis in the following... IF you will NOT be using these values in
any further/future calculations, then you can make the value "look" like
what you want (but note that it will NOT actually be that value; hence the
caution about future use) by simply formatting the entry. Just use the same
procedure I asked you to follow in my previous response and select Custom
from the Category list and put 0\.00 in the Type field.
However, I'm willing to be you will want to use this value in other
calculations. If that is the case, my first question is why not use standard
entries? For 227, just type in 227 and, also, remove the format from the
cells in that column (change the Currency selection to General in the
Formatting Cells dialog). For values with penny amounts, just type in the
decimal point where it would normally be. Do you really think the saving
from typing this on additional character is worth the trouble it causes?
If you are insistent on not typing in the decimal point, then my next
question is... will you be creating all your entries in this column only one
time? If so, follow the procedure Gary laid out for you. If you will be
making multiple entries in this column over time, then you will need an
event procedure to handle adjusting the value. To do this, right click the
tab for the worksheet with this column on it and select View Code from the
menu that pops up. Copy/Past the following into the code window that
appears...
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 4 Then
On Error GoTo Whoops
If InStr(Target.Value, ".") = 0 Then
Application.EnableEvents = False
Target.Value = Target.Value / 100
Application.EnableEvents = True
On Error GoTo 0
End If
End If
Exit Sub
Whoops:
Application.EnableEvents = True
End Sub
Oh, and make sure to remove the format from the cells in that column (change
the Currency selection to General in the Formatting Cells dialog).
Rick
- Show quoted text -