Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
Is it possible to have ore than one private sub worksheet_change? I have written following code Private Sub Worksheet_Change(ByVal Target As Range) If Not Application.Intersect(Range("a1:a100"), Target) Is Nothing Then ActiveCell.Offset(0, 4).Select Else End If End Sub which works fine but I would also like to select activecell.offset(0,2) when target range is ("e1:e100") The reason being one value entered into cell in first range("a1:a100") tabs to column E then I would like after value entered in this cell tab to column G Hope this makes sense Thanks in advance for any ideas Tina |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Tina,
This will do what you want - you can do multiple tests for insersection in the one routine. Private Sub Worksheet_Change(ByVal Target As Range) If Not Application.Intersect(Range("a1:a100"), Target) Is Nothing Then ActiveCell.Offset(0, 4).Select Else If Not Application.Intersect(Range("E1:E100"), Target) Is Nothing Then ActiveCell.Offset(0, 2).Select End If End If End Sub HTH "tina" wrote: Hi Is it possible to have ore than one private sub worksheet_change? I have written following code Private Sub Worksheet_Change(ByVal Target As Range) If Not Application.Intersect(Range("a1:a100"), Target) Is Nothing Then ActiveCell.Offset(0, 4).Select Else End If End Sub which works fine but I would also like to select activecell.offset(0,2) when target range is ("e1:e100") The reason being one value entered into cell in first range("a1:a100") tabs to column E then I would like after value entered in this cell tab to column G Hope this makes sense Thanks in advance for any ideas Tina |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Application.Intersect(Range("a1:a100"), Target) Is Nothing Then Target.Offset(0, 4).Select Elseif Not Application.Intersect(Range("E1:E100"),Target) is Nothing then Target.Offset(0,2).Select End If End Sub -- Regards, Tom Ogilvy "tina" wrote in message ... Hi Is it possible to have ore than one private sub worksheet_change? I have written following code Private Sub Worksheet_Change(ByVal Target As Range) If Not Application.Intersect(Range("a1:a100"), Target) Is Nothing Then ActiveCell.Offset(0, 4).Select Else End If End Sub which works fine but I would also like to select activecell.offset(0,2) when target range is ("e1:e100") The reason being one value entered into cell in first range("a1:a100") tabs to column E then I would like after value entered in this cell tab to column G Hope this makes sense Thanks in advance for any ideas Tina |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
how to change the pivot chart automaticaly as values in the worksheet change | Excel Worksheet Functions | |||
change formula in a shared worksheet without losing change history | Excel Worksheet Functions | |||
Change to Worksheet Change Event | Excel Programming | |||
Change Cell from Validated List Not Firing Worksheet Change Event | Excel Programming |