Solved

Filter Non-Bold text in a specific column in Excel

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

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 50

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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Drop Down List with Unique/Distinct Values (Part II - ComboBox or ListBox and Data Validation List Bonus!) David Miller (dlmille) Intro This article focuses on delivering unique, sorted lists to list objects (e.g., ComboBox, ListBox) and Dat…
Introduction While answering a recent question (http:/Q_27311462.html), I created an alternative function to the Excel Concatenate() function that you might find useful.  I tested several solutions and share the results in this article as well as t…
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

821 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