Excel FAQs: Font formats

While number formatting and more general formatting issues deserve their own FAQ pages on AccountingWEB.co.uk, Simon Hurst focuses this time on font formats in Excel.

Introduction

The standard font commands in Excel are fairly obvious and straightforward whichever version you are using but what happens if you want to tick a bank reconciliation or display a row of mobile phones? Also, with the existence of Excel styles being much more obvious in Excel 2007 and 2010, can they be used to improve the appearance and consistency of spreadsheets?

How do I apply the standard font commands in the different versions?

In Excel 2003 the formatting toolbar includes the main font formatting options. These are also available via the Format, Cells dialog, Font section. In Excel 2007 and 2010 the Font group of the Home tab includes these commands with the Font dialog still being available. In addition, as well as the right-click menu including the Format Cells option as it does in Excel 2003, it also displays the 'mini toolbar' containing a set of formatting commands including the main font formats.

How do I find out more about font formats?

For further information and ideas have a look at:

About the author
Simon Hurst is a former chairman of the ICAEW IT Faculty and runs The Knowledge Base, a consultancy dedicated to helping accountants make effective use of technology. He is a regular contributor to AccountingWEB's ExcelZone and the author of '100 Time-saving Tips for Microsoft Office'. For more information, visit The Knowledge Base website.

Continued...

» Register now

The full article is available to registered AccountingWEB members only. To read the rest of this article you’ll need to login or register.

Registration is FREE and allows you to view all content, ask questions, comment and much more.

Comments

Colour text default

James Dyer | | Permalink

Thanks for the interesting article.

Can anyone show me how to change the default text to red, for example, so that I can add text to an existing spreadsheet in various cells without having to change back to red each time I move cell.  I know I can do them all in one go at the end by selecting all the cells but then I have to remember where they all are.  Excel version 2007.

Thanks.

sysmod's picture

Common problems with Styles

sysmod | | Permalink

Very often styles multiply when cells are copied & pasted from other workbooks or other instances of Excel. If you wait till you get the error message "too many cell formats", it's too late, you have over 4000 different cell formats. I've seen workbooks with over 60,000 styles, but not all were in use.

 It may be useful to have a macro that checks for too many styles (eg over 100) and deletes the unused ones. This code

Sub CleanStyles()

Dim sty As Style, wbTemp As Workbook

 

' First, remove all styles other than Excel's own.

' they may have arrived from pasting from other workbooks

For Each sty In ThisWorkbook.Styles

   If Not sty.BuiltIn Then sty.Delete

Next

 

'Second, revert the remaining styles to Excel's default for a new workbook

Set wbTemp = Workbooks.Add

Application.DisplayAlerts = False

ThisWorkbook.Styles.Merge wbTemp

wbTemp.Close SaveChanges:=False

Application.DisplayAlerts = True

 

End Sub

 

 

Another idea is to check whether the Numberformat of the Normal style is not General. I have seen workbook style corruption where it acquires a Date format.

http://answers.microsoft.com/en-us/office/forum/office_2007-excel/excel-2007-spontaneously-formats-entire-work-book/1ae533af-ecee-41fa-866a-2590343a111d

 

if activeworkbook.styles("Normal").NumberFormat <> "General" then show some message and offer to reset it to General

 

 

sysmod's picture

     1 thanks

sysmod | | Permalink

 

If you're going to click in each cell to enter the text, you may as well do one more click on the Font colour button, change it to red once, and then it stays at red for any subsequent click. Just one more click per cell. Or Ctrl+Y if you prefer to use the keyboard.

 

BTW :

If you change the Normal style, that changes the display of all cells.

If you define a new style, you still have to remember to apply it, so that's still a click,

 

 

keyboard shortcut

James Dyer | | Permalink

Ctrl+Y is a help as I don't have to reach for the mouse and can navigate around using the keyboard.

I know it wasn't the main

duncanphilpstate | | Permalink

I know it wasn't the main thrust of the article, but discussion of inserting ticks and comments about doing things repeatedly got me thinking.

Below is a little macro I recorded to insert a tick from the wingdings font into the current cell - nothing clever about it, just to show it can be done..

What I also wanted to point out is that you can associate this macro with a button on the Quick Access Toolbar (2007 onwards) AND despite the many deficiencies of the QAT, you can tell it during the customisation that the button is for the current workbook only - meaning that it is to some extent context sensitive. To do this, right-click on the QAT, select customise... and then in the dropdown at the top right of the dialogue select the name of the current workbook (rather than "for all documents (default)".

In other words you can create a QAT button within a re-used spreadsheet (or template?) to insert a tick or other symbol with one mouse click.

Hope that helps.

 

Sub InsertTick()
' InsertTick Macro
'
    ActiveCell.FormulaR1C1 = "ü"
    With ActiveCell.Characters(Start:=1, Length:=1).Font
        .Name = "Wingdings"
        .FontStyle = "Regular"
        .Size = 10
        .Strikethrough = False
        .Superscript = False
        .Subscript = False
        .OutlineFont = False
        .Shadow = False
        .Underline = xlUnderlineStyleNone
        .ThemeColor = xlThemeColorLight1
        .TintAndShade = 0
        .ThemeFont = xlThemeFontNone
    End With
End Sub