Hide rows

Panoos64

Well-known Member
Joined
Mar 1, 2014
Messages
882
Hi all, How to manege to hide the all rows except the bold (numbers or text) in column "A" range A4 and rows down, using VBA code?

Thank you all in advance
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
Code:
Sub Hide_Rows()

Dim LastRow As Long
Dim rng As Range
Application.ScreenUpdating = False
LastRow = Cells(Rows.Count, 1).End(xlUp).Row
For Each rng In Range(Cells(4, 1), Cells(LastRow, 1))
    If rng.Font.Bold = True Then rng.EntireRow.Hidden = True
Next rng
Application.ScreenUpdating = True
End Sub
 
Upvote 0
Hi njimack, the code run and works but just i need the versa. The bold should remain unhide. Thank you for your support and your time spent for my project.
 
Upvote 0
How about
Code:
Sub Panoose64()
   Dim Cl As Range
   
   For Each Cl In Range("A4", Range("A" & Rows.Count).End(xlUp))
      Cl.EntireRow.Hidden = Not Cl.Font.Bold
   Next Cl
End Sub
 
Upvote 0
Thank u Fluff, it works perfect!, thank u once again for your support, your help and your time! Have a great day
 
Upvote 0
You're welcome & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,214,566
Messages
6,120,262
Members
448,953
Latest member
Dutchie_1

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