ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   "Worksheet Change" Question (https://www.excelbanter.com/excel-programming/321281-worksheet-change-question.html)

documike

"Worksheet Change" Question
 
I am using the following code to run a macro if the data
in this cell (E26) is changed. I want another cell on
the same worksheet to do the same thing. (E28). I tried
adding another "worksheet change" but it didn't like it,
evidently you can only have one per sheet. How do I add
the other cell into the mix? Thanks

Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("E26")) Is Nothing Then
Sheets("Entry").Select
Application.Run "CopyFilterData5"
End If
End Sub

Bob Phillips[_6_]

"Worksheet Change" Question
 
Mike,

Try this

Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("E26,E28")) Is Nothing Then
Sheets("Entry").Select
Application.Run "CopyFilterData5"
End If
End Sub

--

HTH

RP
(remove nothere from the email address if mailing direct)


"documike" wrote in message
...
I am using the following code to run a macro if the data
in this cell (E26) is changed. I want another cell on
the same worksheet to do the same thing. (E28). I tried
adding another "worksheet change" but it didn't like it,
evidently you can only have one per sheet. How do I add
the other cell into the mix? Thanks

Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("E26")) Is Nothing Then
Sheets("Entry").Select
Application.Run "CopyFilterData5"
End If
End Sub





All times are GMT +1. The time now is 11:15 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com