Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
can I assign a macro to a cell?
I would like to assign a macro to a cell so that when that cell is populated
the series of formattting is applied to other cells. Can I apply a macro to a cell? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
can I assign a macro to a cell?
In a manner of speaking yes you can apply a macro to a cell. You can use the
Change event to make a macro run each time the cell is changed. To access the change event Right Click on the Sheet tab in Excel - Choose View Code (just above the left hand side of the code window you will see a drop down list with the word general in it. Change it to worksheet. When you do this a procedure will be added to the code window which is the Selection Change event (you can delete this as you don't need it). To the right of the box you just changed there is a drop down list. Select Change from that list. This procedure will fire when any cell is changed. If you have some specific cells in mind let me know and I can help you narrow down the cells... -- HTH... Jim Thomlinson "John McMicheal" wrote: I would like to assign a macro to a cell so that when that cell is populated the series of formattting is applied to other cells. Can I apply a macro to a cell? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
can I assign a macro to a cell?
Depending on what formatting you want to apply, you can do this using
conditional formatting. For instance, if you wanted to change the background color in B1:G1 if A1 was =10, select B1:G1, choose Format/Conditional Formatting and enter CF1: Formula is =($A1=10) Format1: Pattern/<color In article , "John McMicheal" <John McMicheal @discussions.microsoft.com wrote: I would like to assign a macro to a cell so that when that cell is populated the series of formattting is applied to other cells. Can I apply a macro to a cell? |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
can I assign a macro to a cell?
Yes,how do I specify which cell to be taken care of ?
"Jim Thomlinson" wrote in message ... In a manner of speaking yes you can apply a macro to a cell. You can use the Change event to make a macro run each time the cell is changed. To access the change event Right Click on the Sheet tab in Excel - Choose View Code (just above the left hand side of the code window you will see a drop down list with the word general in it. Change it to worksheet. When you do this a procedure will be added to the code window which is the Selection Change event (you can delete this as you don't need it). To the right of the box you just changed there is a drop down list. Select Change from that list. This procedure will fire when any cell is changed. If you have some specific cells in mind let me know and I can help you narrow down the cells... -- HTH... Jim Thomlinson "John McMicheal" wrote: I would like to assign a macro to a cell so that when that cell is populated the series of formattting is applied to other cells. Can I apply a macro to a cell? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Assign Macro to a Cell | Excel Worksheet Functions | |||
Formula or Macro to Assign Cell Locations | Excel Discussion (Misc queries) | |||
Assign F1 as a macro? | Excel Discussion (Misc queries) | |||
assign a clickable macro to a cell? | Excel Programming | |||
Assign Macro to cell??? | Excel Programming |