Solved

Filter Non-Bold text in a specific column in Excel

Posted on 2013-12-17
4
844 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 51

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 51

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: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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

This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
Excel can be a tricky bit of software to get your head around. Whilst you’ll be able to eventually get to grips with the basic understanding of how to get by, there are a few Excel tips that not everybody will even know about let alone know how to d…
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…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

724 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