Consulting

Results 1 to 6 of 6

Thread: Hide rows with bold text

  1. #1
    VBAX Regular
    Joined
    May 2011
    Posts
    46
    Location

    Hide rows with bold text

    Hello all,

    I'd like to hide rows that have text in bold in column N
    The range is N26:N85

    Is this possible?

  2. #2
    VBAX Tutor
    Joined
    Jun 2012
    Posts
    269
    Location
    Ethan,
    Try this:

    [VBA]Sub test()
    Dim i As Integer
    For i = 26 To 85
    If Sheet1.Cells(i, "N").Font.Bold = True Then Sheet1.Range("A" & i).EntireRow.Hidden = True

    Next i

    End Sub[/VBA]

  3. #3
    VBAX Regular
    Joined
    May 2011
    Posts
    46
    Location
    Wow, thank you CodeNinja!
    Last question: How to use it for non-bold only?

  4. #4
    VBAX Regular
    Joined
    May 2011
    Posts
    46
    Location
    I tried .Font.Regular but that did not work

  5. #5
    VBAX Regular
    Joined
    May 2011
    Posts
    46
    Location
    Sorry for that it should be offcourse
    Font.Bold = False Then...


  6. #6
    VBAX Tutor
    Joined
    Jun 2012
    Posts
    269
    Location
    Good for you figuring that out!

Posting Permissions

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