Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello,
I would like a macro to run when a specific range of cells are changed, but I do not want it to run if any other cells are changed. For instance if any cell in the range A1:A25 are change I would like the macro to run. But I do not want it to run if any other cell on the worksheet is changed. Is this possible? Thank you, |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 1 and Target.Row < 26 Then <Perform Macro End If End Sub -- Sincerely, Ronald R. Dodge, Jr. Master MOUS 2000 "tjh" wrote in message ... Hello, I would like a macro to run when a specific range of cells are changed, but I do not want it to run if any other cells are changed. For instance if any cell in the range A1:A25 are change I would like the macro to run. But I do not want it to run if any other cell on the worksheet is changed. Is this possible? Thank you, |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
What should happen if the user changes a range of cells, some in and some
out of the specific range? Say by pasting to A20:A30 or selecting A1:B10, C5:D15, A18:A22 typing an entry and pressing Ctrl-Enter? -- Jim "tjh" wrote in message ... | Hello, | | I would like a macro to run when a specific range of cells are changed, but | I do not want it to run if any other cells are changed. For instance if any | cell in the range A1:A25 are change I would like the macro to run. But I do | not want it to run if any other cell on the worksheet is changed. Is this | possible? | | Thank you, |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
That is where Target.Rows.Count with Target.Row will need to be taken into
account. This is also true for Target.Columns.Count with Target.Column. However, this could be a problem as if multiple different range selections is selected, then a value typed in, then pressed Ctrl-Enter, which case would also require using Target.Areas, such as If Target.Areas.Count1 Then 'There are multiple range areas selected. Else 'There is only one area selected. End If Such example of multiple areas would be like if A5:B8, A11:A15, C8:F24 were all selected and the only cells selected, then the user typed in something like the numeric value of "0", then pressed Ctrl-Enter. -- Sincerely, Ronald R. Dodge, Jr. Master MOUS 2000 "Jim Rech" wrote in message ... What should happen if the user changes a range of cells, some in and some out of the specific range? Say by pasting to A20:A30 or selecting A1:B10, C5:D15, A18:A22 typing an entry and pressing Ctrl-Enter? -- Jim "tjh" wrote in message ... | Hello, | | I would like a macro to run when a specific range of cells are changed, but | I do not want it to run if any other cells are changed. For instance if any | cell in the range A1:A25 are change I would like the macro to run. But I do | not want it to run if any other cell on the worksheet is changed. Is this | possible? | | Thank you, |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I change a Worksheet_change event to a beforesave event? | Excel Programming | |||
MsgBox in Enter event causes combobox not to run Change event | Excel Programming | |||
Change event and calculate event | Excel Programming | |||
change event/after update event?? | Excel Programming |