Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
'-----------------------------------------------------------------
Private Sub Worksheet_Change(ByVal Target As Range) '----------------------------------------------------------------- Const WS_RANGE As String = "F:F" On Error GoTo ws_exit: Application.EnableEvents = False If Not Intersect(Target, Me.Range(WS_RANGE)) Is Nothing Then With Target If .Value = "yes" Then .Offset(0, -2).Value = Abs(.Offset(0, -2).Value) End If End With End If ws_exit: Application.EnableEvents = True End Sub 'This is worksheet event code, which means that it needs to be 'placed in the appropriate worksheet code module, not a standard 'code module. To do this, right-click on the sheet tab, select 'the View Code option from the menu, and paste the code in. -- HTH Bob Phillips (remove xxx from email address if mailing direct) "Ørjan Langbakk" wrote in message ... I have a cell, with a value that's negative, until another cell is changed from "no" to "yes" - what I would like is that the original cell changes value from <negative value to <positive value when I change the "yes/no" cell. Quick example: In column D I have several values, each originally negative (these are payments not yet received) - and marked in column F (same row) with "no" - when I receive payment, I change the "no" to a "yes", and manually changes the corresponding cell in the same row to a positive value. Is it possible to automate this? So that when I change the value in column F, row <something, I get a corresponding result in colum D, row <same something? -- mvh Ørjan Langbakk http://www.bergenpchjelp.no |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
SET statement tutorial | Excel Discussion (Misc queries) | |||
If statement | Excel Discussion (Misc queries) | |||
Do I need a sumif or sum of a vlookup formula? | Excel Worksheet Functions | |||
Generating excel combinations | Excel Discussion (Misc queries) | |||
What statement to use? | Excel Worksheet Functions |