initiate a macro

J

jt

I would like to run a macro simply by entering a value in a particular
cell. Is this possible? thanks in advance....
 
I

isabelle

hi,

copy this macro on the page code of this sheet

Private Sub Worksheet_Change(ByVal Target As Range)
Set isect = Application.Intersect(Target, Range("A1"))
If Not isect Is Nothing Then
' write here what to do
End If
End Sub


--
isabelle



Le 2012-01-19 13:13, jt a écrit :
 
J

jt

I would like to run a macro simply by entering a value in a particular
cell. Is this possible? thanks in advance....

thanks for the response. How do I make the value I just entered be
the search value?
 
V

Vacuum Sealed

thanks for the response. How do I make the value I just entered be
the search value?

Hi JT

Isabelle has given you a cell reference of A1 as the target cell.

So when you change the value in that cell it will trigger whatever
additional code you want it to trigger.

You can change the cell reference to any cell that fits your
requirement, other than that you will have to be more specific on what
it is you want to initiate beyond the Target Cell OnChange Event.

The more detail you can provide the more likely you will get the answer
you need a lot quicker.

HTH
Mick.
 
J

jt

Hi JT

Isabelle has given you a cell reference of A1 as the target cell.

So when you change the value in that cell it will trigger whatever
additional code you want it to trigger.

You can change the cell reference to any cell that fits your
requirement, other than that you will have to be more specific on what
it is you want to initiate beyond the Target Cell OnChange Event.

The more detail you can provide the more likely you will get the answer
you need a lot quicker.

HTH
Mick.

I would like to initiate a macro that will search a range of data for
a particular value
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top