Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
How do i set up that when i exit cell B2 that the number will change to a
negative number?? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
One way:
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) With Target If .Cells.Count 1 Then Exit Sub If .Address(False, False) = "B2" Then If IsNumeric(.Value) Then On Error Resume Next Application.EnableEvents = False .Value = -.Value Application.EnableEvents = True On Error GoTo 0 End If End If End With End Sub In article , enyaw wrote: How do i set up that when i exit cell B2 that the number will change to a negative number?? |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
One way is to type a "-" in front of the number just before you move the
cursor. Or you can veiw this site to get some ideas on how to use the SelectionChange event. http://support.microsoft.com/kb/213193 "enyaw" wrote: How do i set up that when i exit cell B2 that the number will change to a negative number?? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Converting a negative number to a positive number | Excel Discussion (Misc queries) | |||
Change negative sign from end of number to the beginning of the number. | Excel Programming | |||
2003= negative number&2004= negative number How Do I Calculate gro | Excel Worksheet Functions | |||
Compare/match positve number against negative number? | Excel Programming | |||
Compare/match positve number against negative number? | Excel Programming |