Run code based on cell contents

  • Thread starter Thread starter Pete JM
  • Start date Start date
P

Pete JM

Hi,

I am stuck!!

Is there a piece of code that will allow a macro to run based on cel
contents.

For example i would like a piece of code to run and loop while th
value in cell A1 equals 1 But stop if the value equals 2.

Regards

Pet
 
Thank you that was really useful to know, but is there a way i can ge
the code to run without attaching it to a button.

So if i type 1 into cell A1 and press enter the macro wil
automatically run?

Regards

Pet
 

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

Back
Top