+ Reply to Thread
Results 1 to 2 of 2

Conditional Change of Font Size

Hybrid View

svaiskau Conditional Change of Font... 06-07-2007, 11:32 AM
T-J This will set the font size... 06-07-2007, 03:23 PM
  1. #1
    Registered User
    Join Date
    06-06-2007
    Posts
    53

    Conditional Change of Font Size

    Using traditional Conditional Formatting will not allow you to change font size. I want to set a series of cells to lower their font size to Arial 9 if the value is between 100 and 999, and to Arial 7 if the value is greater than 999.

    Arial is the default font face, so that isn't changing at all.

  2. #2
    Valued Forum Contributor
    Join Date
    08-26-2006
    Location
    -
    MS-Off Ver
    2010
    Posts
    388
    This will set the font size of cells in the range A1:C5 on sheet1:
    Sub SetFontSize()
        Dim rngCell As Range
        
        For Each rngCell In Worksheets("Sheet1").Range("A1:C5").Cells
            If rngCell.Value >= 100 And rngCell.Value <= 999 Then
                rngCell.Font.Size = 9
            ElseIf rngCell.Value > 999 Then
                rngCell.Font.Size = 7
            End If
        Next rngCell
    
    End Sub

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1