Filtering Bold Data

Dear readers today I came to know about a situation where the user was looking to filter data in a range, but he wanted to filter only those cells in range which has BOLD formatting.

I thought of doing it using VBA as there was no option that came to my mind that time.  The below code worked for me.

Sub FilterBold()
Dim myRange As Range

Set myRange = Application.InputBox(Prompt:="Please Select a Range", Title:="InputBox Method", Type:=8)
myRange.Select
Application.ScreenUpdating = False
For Each myRange In Selection
If myRange.Font.Bold = False Then
myRange.EntireRow.Hidden = True
End If
Next myRange
Application.ScreenUpdating = True
End Sub

With this post I am entering into the ocean of coding and will try to match pace with my other excel blogger friends.

"HAPPY LEARNING"

2 comments:

  1. the sheet hangs after running the macro.

    ReplyDelete
  2. I found this very useful for me to learn excel more

    ReplyDelete