Solved

Filter Non-Bold text in a specific column in Excel

Posted on 2013-12-17
4
785 Views
Last Modified: 2013-12-17
Is there a way in VBA to filter my rows to only show rows that have bold text in column L beginning in Row 2?
0
Comment
Question by:Lawrence Salvucci
  • 2
  • 2
4 Comments
 
LVL 49

Expert Comment

by:Rgonzo1971
ID: 39723714
Hi

Select your range and use this macro

Sub BoldFilter()
Dim c As Range
For Each c In Selection
    If c.Font.Bold = False Then
        c.EntireRow.Hidden = True
    End If
Next c
End Sub

Open in new window

Regards
0
 
LVL 1

Author Comment

by:Lawrence Salvucci
ID: 39723720
Hi,
Thank you for the quick response. Is there a way I can put into your code the column and the starting row so my user doesn't have to select anything? I just want them to be able to run the macro and have it do all that automatically.
Larry
0
 
LVL 49

Accepted Solution

by:
Rgonzo1971 earned 500 total points
ID: 39723737
Hi

Here it is

Sub BoldFilter()
Dim c As Range
For Each c In Range(Range("L" & 2), Range("L" & Rows.Count).End(xlUp))
    If c.Font.Bold = False Then
        c.EntireRow.Hidden = True
    End If
Next c
End Sub

Open in new window

Regards
0
 
LVL 1

Author Closing Comment

by:Lawrence Salvucci
ID: 39723745
Perfect! Thank you very much for your quick response and perfect solution!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This Article briefly covers methods of calculating the NPV and IRR variants in Excel as well as the limitations in calculating and interpreting IRR results. Paraphrasing Richard Shockley, author of my favourite finance reference tex…
This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now