Styles in Excel
Applying styles
There are two methods to apply a style to a cell.
The first one is by using the menu: "Format", "Style…". Select the style you need from the dropdown list and click OK. Or in Excel 2010 (2013, 2007): Home tab, Styles group, Expand the Cell Styles gallery and click a style.
In Excel 97-2003 you can save yourself some time (in future) by adding the Style dropdown to a toolbar, like this:
TIP: Adding the style dropdown to a toolbar.
- Rightclick any toolbar or menu and select "Customize...". The dialog screen shown below will appear (after you click the "Commands" tab):

- Below "Categories", click the item called "Format". Now drag the Style dropdown to one of your toolbars (see below)

Dragging the Style control to a toolbar and let go.
Applying a style to some cells now takes nothing more than picking the right one from your new style dropdown. If the format of any of the selected cells deviates from the selected style then Excel (Excel 97 - 2003) will ask you whether or not to update the style to match the formatting of the selected cells (Excel 2010 (2013, 2007) does not ask you this question!):
Confirm to Excel how it must apply the style
This dialog needs some explaining to understand what happens when you click a button.
-
When you click Yes:
Excel will check all selected cells and add only those elements to the style which coincide for all cells. So if you for example changed a font characteristic for one cell, then Excel will remove the Font settings from the style. Of course you can go back to the style using the menu (format, styles) and modify the style to include that setting again. Note however, that the one cell you changed a font thing to will remain being different from the others.
-
If you click No:
The selected style will be applied to all cells. Any formatting in those cells will be replaced with the selected formatting elements if the style you chose. Any deviations from a style will be removed. This is the choice Excel 2010 (2013, 2007) makes for you if you select a style from the styles gallery.
Comments
All comments about this page:
Comment by: Alan Hutchins (2/6/2009 6:16:48 AM)
I was hoping that I could use this to create a few specific styles that would be available for me to select in any workbook.
Comment by: Jan Karel Pieterse (2/6/2009 6:59:33 AM)
You have uncovered a small omission in the article. Styles are part of a workbook, not stored anywhere else.
So if you create a style, it stays with the workbook.
You can however copy a style from one workbook to another by simply copying a cell with that style to the other file.
Also, there is a Merge button on the style dialog that lets you merge the styles from another workbook into the one you have in front of you.
Comment by: John Pittman (6/3/2009 4:38:33 PM)
I would like to dynamically add "Good", Neutral", or "Bad" Styles to cells in a spreadsheet.
I can manage getting the content in cells to change, but would like to change the style as well.
Am I right in suggesting that this is not the second method?
Comment by: Jan Karel Pieterse (6/3/2009 11:40:59 PM)
The text on this page isn't very clear on what the second method is. In fact I meant to write that the second method is by using the styles dropdown, which you can add to a toolbar.
I'm not sure if you can use conditional formatting to change the style in Excel 2007. If not, then I would just use a conditional format for your three situations and manually set up their formatting.
Comment by: Chris Ainley (10/23/2009 6:22:08 PM)
How does one get the Good, Bad, Neutral, etc designation icons onto the toolbar (so that I don't have to keep using the dropdown)?
Thanks,
Chris
Comment by: Jan Karel Pieterse (10/24/2009 1:08:30 AM)
I'm afraid you can't add a specific style button to the QAT. But you can create small macros and add macro buttons to the QAT for this purpose.
For example:
Selection.Style = "Bad"
ENd Sub
Comment by: PROF. GOVARDHAN (12/7/2012 3:43:02 AM)
Comment by: Rohit (3/6/2014 8:49:19 PM)
I am running a Macro to split a file with 57 tabs to 57 separate files but but the Macro is ran and the files are created, the col. colors (Style) in the new files changes from grey to black. Any help?
Thanks
Have a question, comment or suggestion? Then please use this form.
If your question is not directly related to this web page, but rather a more general "How do I do this" Excel question, then I advise you to ask your question here: www.eileenslounge.com.