question about triggering macro when value of cell changes

ces005

Board Regular
Joined
Mar 13, 2006
Messages
189
Hi,

I have a cell (D3). When the cell's value changes, I want a macro to be run. It is a picklist (data validation is tied to a list). How do I do this? Thanks.

-Eileen
 

Some videos you may like

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop

pgc01

MrExcel MVP
Joined
Apr 25, 2006
Messages
19,870
Hi Eileen

You can use the worksheet Change Event

Paste this code in the respective worsheet module:

Code:
Private Sub Worksheet_Change(ByVal Target As Range)

If Target.Address = "$D$3" Then

    ' run your code

End If
End Sub

Add your code.

Hope this helps
PGC
 

Watch MrExcel Video

Forum statistics

Threads
1,113,795
Messages
5,544,332
Members
410,603
Latest member
rseckler
Top