Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hell friends,
I want to know whether it is possible to create a code which by invoking it to run should hide the rows which are highlighted by a particular colour. If so any one will help me by providing it. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try this
Sub Test() Dim rw As Range For Each rw In ActiveSheet.UsedRange.Rows If rw.Interior.ColorIndex = 34 Then rw.Hidden = True End If Next rw End Sub -- HTH Bob Phillips "srinivasan" wrote in message ... Hell friends, I want to know whether it is possible to create a code which by invoking it to run should hide the rows which are highlighted by a particular colour. If so any one will help me by providing it. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Mr Bob, Thanks a lot. But as I am not familiar to VBA how it will work? Any colour to the cell background or font colour.If I change the colour is the code has to be changed |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
We are talking cell colour here, testing the Colorindex.
Do you want to check both cell colour and font colour? If so, what colours? -- HTH Bob Phillips "srinivasan" wrote in message ... Mr Bob, Thanks a lot. But as I am not familiar to VBA how it will work? Any colour to the cell background or font colour.If I change the colour is the code has to be changed |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hello, I want to use the cell colour with pale blue(not font colour). Expecting your kind response. |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sub Test()
Dim rw As Range For Each rw In ActiveSheet.UsedRange.Rows If rw.Interior.ColorIndex = 37 Then 'Pale blue rw.Hidden = True End If Next rw End Sub Go to the VB IDE (alt-F11), insert a code module (InsertModule), and paste the code in. Then in excel ToolsMacroMacros... and select Test and Run. -- HTH Bob Phillips "srinivasan" wrote in message ... Hello, I want to use the cell colour with pale blue(not font colour). Expecting your kind response. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Coloured rows | New Users to Excel | |||
How to code Macro for hiding rows | Excel Worksheet Functions | |||
Coloured rows | New Users to Excel | |||
Coloured rows | New Users to Excel | |||
Is it possible to have a code that counts coloured cells? | Excel Programming |