VBA for hiding unbolded rows

artemis1975

New Member
Joined
Jul 12, 2011
Messages
3
Hello,

Every week I have to go through a generated report and physically hide all the rows with unbolded text.

Is it possible to write a macro that will automatically hide all rows with unbolded text in a worksheet?

Thank you.
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
Hide rows which are completely bold, which have any bold in them anywhere, or which are bold in a specific column?
 
Upvote 0
You might be able to use something like this -- Select/Highlight the Sheet Range to be included in the search before running Macro

In a Standard Module paste this code in:
Code:
Sub Foo()
On Error Resume Next
Set Rng = Selection
For Each c In Rng
    If c <> "" Then
        If Not c.Font.Bold Then
        c.EntireRow.Hidden = True
        End If
    End If
Next c
End Sub
 
Upvote 0
It's a budget report. It's set up like this:

Bolded Text: Category Number and name
Several rolls of unbolded text that are the individual entries into that category
Bolded Text: Subtotal of that Category


We are only interested in looking at the bolded rows (the category name and the category subtotal) and hiding all the information between.

This is done manually, I am hoping there is a macro that would automatically hide all unbolded rows.

Hope that explains it.
 
Upvote 0

Forum statistics

Threads
1,224,598
Messages
6,179,822
Members
452,946
Latest member
JoseDavid

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top