Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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.worksheet.functions
|
|||
|
|||
macro to hide data (with conditional formatting?)
You can hide the values in the row with Conditional Formatting but the
values will still be there. You can hide a Row when a next value is entered into it and a cell in the row reaches a predetermined value. However, doing just that would be confusing and the cursor would still be in the same, (now hidden) row and other unseen data could be added. It would be better if you described what it is that you want to do but this Worksheet module code will hide the row that the cursor is in when Column J in that row is greater than 10. It gives a message box warning then hides the row and places the cursor in the next visible row down in Column A Option Explicit Private Sub Worksheet_Change(ByVal Target As Excel.Range) Dim x As Long If Cells(Target.Row, 10).Value 10 Then MsgBox "You have reached the Target value" & vbLf & _ "This Row will now be hidden" Target.EntireRow.Hidden = True x = Target.Row Do Until Cells(x, 1).EntireRow.Hidden = False x = x + 1 Loop Cells(x, 1).Select End If End Sub Post back saying what it is that you want to do. -- HTH Sandy In Perth, the ancient capital of Scotland and the crowning place of kings Replace @mailinator.com with @tiscali.co.uk "Ginna Moore" wrote in message ... 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 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) |