Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default Hide unbolded rows in specific column

How would I write the code to hide only rows that do not have bolded items
in column K ...


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,726
Default Hide unbolded rows in specific column

For i = 1 To Cells(Rows.Count,"K").End(xlUp).Row
Rows(i).Hidden < Cells(i,"K").Font.Bold
Next i

--
---
HTH

Bob

(change the xxxx to gmail if mailing direct)
"Annette" wrote in message
...
How would I write the code to hide only rows that do not have bolded items
in column K ...



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default Hide unbolded rows in specific column

Sub HideNotBold()

Dim ColK As Range
'find last row of data in column k plus 1
Dim lngLastRowk As Long
lngLastRowk = Range("k65536").End(xlUp).Rows
Set ColK = Range("k1:k" & lngLastRowk + 1)

'check each cell value
For Each c In ColK
If c.Font.Bold = True Then
c.EntireRow.Hidden = True
End If
Next c
End Sub

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
hide rows if nil result of formula in specific column Joy Excel Discussion (Misc queries) 2 March 1st 10 02:33 AM
Hide data in specific rows/colums/cells in Excel 2003 Ben Excel Discussion (Misc queries) 3 October 21st 07 04:33 PM
how to create a formula to hide specific rows after meeting requi DNelson New Users to Excel 2 February 7th 06 01:06 PM
Hide all rows where one specific cell in that row = 0? jaydevil Excel Discussion (Misc queries) 2 August 26th 05 02:48 PM
hide rows with specific contents Dennis Cheung[_2_] Excel Programming 2 May 12th 05 06:22 AM


All times are GMT +1. The time now is 12:14 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"