Home |
Search |
Today's Posts |
#1
![]() |
|||
|
|||
![]()
In a workbook I have multiple worksheets and I can code it
to do a certain things on the change function of each worksheet, But if I change any cell the code runs, what I am looking for is something that when I change a particular value in a range say from B3 to Z3, if any of those values are changed then I want my code to run, otherwise ignore it. so for example the user changes the value in cell C5 nothing happens, but they then change the value in cell P3 the code will run Hope this is clear. Also where would I put the code to make it work on the worksheet or in a module Thanks |
#2
![]() |
|||
|
|||
![]()
You can't keep the worksheet_change event code from running when a
change is made on the sheet, but you can apply your code only to your desired range: Private Sub Worksheet_Change(ByVal Target As Excel.Range) If Not Intersect(Target, Range("B3:Z3")) Is Nothing Then 'Do stuff End If End Sub In article , "Nigel Bennett" wrote: In a workbook I have multiple worksheets and I can code it to do a certain things on the change function of each worksheet, But if I change any cell the code runs, what I am looking for is something that when I change a particular value in a range say from B3 to Z3, if any of those values are changed then I want my code to run, otherwise ignore it. so for example the user changes the value in cell C5 nothing happens, but they then change the value in cell P3 the code will run Hope this is clear. Also where would I put the code to make it work on the worksheet or in a module Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|