You can scale either a single cell or a range of cells ( column, row,
whatever). In an unused cell enter
..5
and copy this cell. Then select the cells you want to adjust and
paste/special with multiply checked.
To do this automatically would require an event macro:
Put this in your worksheet code module (right-click the worksheet tab
and choose View Code):
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
Const cdSCALE As Double = 0.5 'change to suit
With Target
If .Count = 1 Then
If .Address(False, False) = "E5" Then 'change E5 to suit
On Error Resume Next
Application.EnableEvents = False
.Value = Application.Round(.Value * cdSCALE, 2)
Application.EnableEvents = True
End If
End If
End With
End Sub
I used Round() since you're talking about currency. If you want
half-pennies, use
.Value = .Value * cdSCALE
instead.
Note that format of cells (other than Text) doesn't affect how inputs
are parsed or stored.
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.