Solved

Filter Non-Bold text in a specific column in Excel

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

Expert Comment

by:Rgonzo1971
Comment Utility
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
Comment Utility
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 48

Accepted Solution

by:
Rgonzo1971 earned 500 total points
Comment Utility
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
Comment Utility
Perfect! Thank you very much for your quick response and perfect solution!
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Suggested Solutions

What is a Form List Box? (skip if you know this) The forms List Box is the alternative to the ActiveX list box. If you are using excel 2007, you first make sure you have a developer tab (click the Orb)->"Excel Options"->Popular->"Show Developer tab…
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…
Viewers will learn the basics of slicers and timelines for both PivotTables and standard Excel tables in Excel 2013.
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…

762 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

10 Experts available now in Live!

Get 1:1 Help Now