Results 1 to 2 of 2
  1. #1
    Star Lounger
    Join Date
    Oct 2001
    Location
    Ellettsville, Indiana, USA
    Posts
    76
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Formatting Subtotals (VBA/Excel XP)

    When I create subtotals in Excel it formats the text bold but leaves the subtotals unformatted. I had a simple code that formatted the subtotal info across the entire row, however, I cannot find it now...can someone help. Thanks

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Formatting Subtotals (VBA/Excel XP)

    Does this macro do what you want? Select any cell in the table with the subtotals before running it.

    Sub BoldSubTotals()
    Dim oCell As Range
    For Each oCell In ActiveCell.CurrentRegion
    If Left(oCell.Formula, 9) = "=SUBTOTAL" Then
    oCell.Font.Bold = True
    End If
    Next oCell
    Set oCell = Nothing
    End Sub

Posting Permissions

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