![]() |
Run code based on cell contents
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 -- Message posted from http://www.ExcelForum.com |
Run code based on cell contents
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 -- Message posted from http://www.ExcelForum.com |
Run code based on cell contents
Pete
Check out Event procedures at David McRitchie's site http://www.mvps.org/dmcritchie/excel/event.htm Or at Chip Pearson's site http://www.cpearson.com/excel/events.htm Event code will fire when you enter something(1 or 2) into A1 Gord Dibben Excel MVP On Tue, 22 Jun 2004 11:17:19 -0500, Pete JM wrote: Thank you that was really useful to know, but is there a way i can get the code to run without attaching it to a button. So if i type 1 into cell A1 and press enter the macro will automatically run? Regards Pete --- Message posted from http://www.ExcelForum.com/ |
All times are GMT +1. The time now is 10:04 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com