Solved

A particular cell that changes triggers a macro

Posted on 2014-10-26
8
121 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 5

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 5

Expert Comment

by:Flora
ID: 40405142
put this code into Summary sheet object
0
 
LVL 5

Expert Comment

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

you were few second late :-)
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
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 5

Expert Comment

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

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
The viewer will learn how to simulate a series of coin tosses with the rand() function and learn how to make these “tosses” depend on a predetermined probability. Flipping Coins in Excel: Enter =RAND() into cell A2: Recalculate the random variable…
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…

743 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now