Automatic Colour Fill In

E

Elena Minguillon

How do I create a macro or command in excel which fills in a cell with
a colour when I type a certain key? i.e. if I type 'H', the cell
automatically fills in yellow or if I type S it fills in blue. I need
to create a spreadsheet which does this for 3 to 4 commands and
colours over a number of cells.
 
A

Alert

How do I create a macro or command in excel which fills in a cell with
a colour when I type a certain key? i.e. if I type 'H', the cell
automatically fills in yellow or if I type S it fills in blue. I need
to create a spreadsheet which does this for 3 to 4 commands and
colours over a number of cells.

Hi,

No problem!

If the contents of the cell is always going be H or HS, you can use
conditional formatting to set the format based on the value of the
cell:

Format > Conditional Formatting

Or, to achieve this without affecting the contents of the cell, simply
record a Macros for each key as follows:

Tools > Macros > Record Macro

In the Record Macro dialog, type S as the shortcut key and click ok to
record, then change the color of the current cell to blue. Click the
stop button to stop recording.

Try it out by selecting a cell and pressing Ctrl+Shift+S, then do the
same for the H key but change the color to yellow.

Piece of cake.

Good luck!

Mark.


Any questions? Ask Cupid!
http://www.askcupid.net
 

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