Custom Formating Cells
This is called 'event code'. Copy the code, right-click the tab, and paste
it into the window that opens up:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count 1 Or IsEmpty(Target) Then Exit Sub
If Not Intersect(Target, Range("A1:A10")) Is Nothing Then
If IsNumeric(Target) Then
Application.EnableEvents = False
Target.Value = Abs(Target.Value * 1000)
Application.EnableEvents = True
End If
End If
End Sub
Notice, the range is A1:A10; change to suit your needs...
Regards,
Ryan---
--
RyGuy
"JohnWFUBMC" wrote:
I want to format a cell so that when I type a number into that cell it will
take the absolute value of that number and then multiple it by 1000. Is
there anyway to do this without generating a formula in a new cell?
|