Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
macro to hide data (with conditional formatting?)
I have a large spreadsheet and I want it to automatically HIDE a row if a
certain cell value meets a specific criteria. Does anyone know if this can be done? I know I can do this manually but would like to automate if possible. Thanks. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
macro to hide data (with conditional formatting?)
I believe this is what you are after. Right click the sheet tab where
you want this to take place and paste this (modify to suite): Private Sub Worksheet_Change(ByVal Target As Range) If Target.Text = "Freddy" Then _ Target.EntireRow.Hidden = True End Sub This will hide the target's row anytime Freddy is entered into it. Ginna Moore wrote: I have a large spreadsheet and I want it to automatically HIDE a row if a certain cell value meets a specific criteria. Does anyone know if this can be done? I know I can do this manually but would like to automate if possible. Thanks. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
macro to hide data (with conditional formatting?)
Or you can use something like this in the Workbook_Open event to hide
all rows in Sheet 1 where the value in column A is Freddy. Private Sub Workbook_Open() Dim r As Long With Sheets("Sheet1") .Rows.Hidden = False For r = 2 To .Cells(.Rows.Count, 1).End(xlUp).Row If .Cells(r, 1).Value = "Freddy" Then _ .Cells(r, 1).EntireRow.Hidden = True 'or .Rows(r).Hidden = True Next r End With End Sub Ginna Moore wrote: I have a large spreadsheet and I want it to automatically HIDE a row if a certain cell value meets a specific criteria. Does anyone know if this can be done? I know I can do this manually but would like to automate if possible. Thanks. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How can I use conditional formatting to hide or delete rows? | Excel Worksheet Functions | |||
macro to hide data (with conditional formatting?) | Excel Worksheet Functions | |||
Hide rows with conditional formatting | Excel Discussion (Misc queries) | |||
Conditional Formatting to Hide Rows or Columns? | Excel Discussion (Misc queries) | |||
CAN I HIDE ROWS WITH CONDITIONAL FORMATTING? | Excel Discussion (Misc queries) |