Solved

A particular cell that changes triggers a macro

Posted on 2014-10-26
8
126 Views
Last Modified: 2014-10-26
I need to trigger a macro only if Summary.range("B13") changes. Summary is sheet 5
0
Comment
Question by:bearblack
  • 4
  • 3
8 Comments
 
LVL 6

Assisted Solution

by:Flora
Flora earned 250 total points
ID: 40405140
here it is.  put this code into the sheet object

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$b$13" Then
Call YourMacro
End If
End Sub
0
 
LVL 27

Accepted Solution

by:
Glenn Ray earned 250 total points
ID: 40405141
You can do this with a Worksheet_Change event macro that is inserted in Sheet5:
Worksheet_Change event
Regards,
-Glenn
0
 
LVL 6

Expert Comment

by:Flora
ID: 40405142
put this code into Summary sheet object
0
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

 
LVL 6

Expert Comment

by:Flora
ID: 40405143
Glenn I was first   :-)

you were few second late :-)
0
 
LVL 27

Expert Comment

by:Glenn Ray
ID: 40405149
Yep; that's what I get for creating a pretty graphic. :-P

-Glenn
0
 
LVL 2

Author Comment

by:bearblack
ID: 40405152
Tried it and ANY cell that changes on the Summary sheet triggers the private sub.
0
 
LVL 27

Expert Comment

by:Glenn Ray
ID: 40405154
You'll have to show us your code; if you used either Flora20's or my example, it would only happen if cell B13 of Sheet5 (Summary ?) was changed.

-Glenn
0
 
LVL 6

Expert Comment

by:Flora
ID: 40405167
can you check the attached file.
F--F--Book1.xlsm
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Workbook link problems after copying tabs to a new workbook? David Miller (dlmille) Intro Have you either copied sheets to a new workbook, and after having saved and opened that workbook, you find that there are links back to the original sou…
This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question