Hide rows

Panoos64

Well-known Member
Joined
Mar 1, 2014
Messages
835
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
 

Some videos you may like

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.

njimack

Well-known Member
Joined
Jun 17, 2005
Messages
7,764
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
 

Panoos64

Well-known Member
Joined
Mar 1, 2014
Messages
835
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.
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
53,071
Office Version
  1. 365
Platform
  1. Windows
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
 

Panoos64

Well-known Member
Joined
Mar 1, 2014
Messages
835
Thank u Fluff, it works perfect!, thank u once again for your support, your help and your time! Have a great day
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
53,071
Office Version
  1. 365
Platform
  1. Windows
You're welcome & thanks for the feedback
 

Watch MrExcel Video

Forum statistics

Threads
1,122,842
Messages
5,598,394
Members
414,234
Latest member
grlevesq

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
Top