Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,345
Default 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
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
How can I use conditional formatting to hide or delete rows? linda.beautiful.california Excel Worksheet Functions 6 July 15th 08 09:09 PM
Macro Conditional Formatting Sandy Excel Worksheet Functions 2 May 10th 07 02:25 PM
Hide rows with conditional formatting Gerry Verschuuren Excel Discussion (Misc queries) 5 April 8th 07 01:34 PM
Conditional Formatting to Hide Rows or Columns? sczegus Excel Discussion (Misc queries) 3 September 27th 06 09:32 PM
CAN I HIDE ROWS WITH CONDITIONAL FORMATTING? Likepike Excel Discussion (Misc queries) 2 December 21st 04 04:02 PM


All times are GMT +1. The time now is 12:36 PM.

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"