Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,119
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,624
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Assign Macro to a Cell Bob Myers Excel Worksheet Functions 2 December 14th 09 07:35 PM
Formula or Macro to Assign Cell Locations econWGR Excel Discussion (Misc queries) 1 February 16th 07 02:57 AM
Assign F1 as a macro? Ryk Excel Discussion (Misc queries) 7 October 17th 06 01:12 AM
assign a clickable macro to a cell? neowok[_44_] Excel Programming 10 April 14th 04 01:36 PM
Assign Macro to cell??? Ron de Bruin Excel Programming 1 August 8th 03 04:23 PM


All times are GMT +1. The time now is 09:28 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"