Solved

Filter Non-Bold text in a specific column in Excel

Posted on 2013-12-17
4
802 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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

INDEX and MATCH can be used to great effect to replace HLOOKUP and VLOOKUP as it does not have the limitation of needing the data to be sorted so that the reference value is in the first column or row. It also has the ability to perform a bi-directi…
Convert between Excel file formats (.XLS, .XLSX, .XLSM) with/without macro option David Miller (dlmille) Intro Over this past Fall, I've had the opportunity to see several similar requests and have developed a couple related solutions associate…
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 will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.

803 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