Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
That worked Nichevo thanks for the input,
Now i've been working on my other hide button for hours now and still can't get it to work. now I'm trying to hide any thing that does not equal 0 in the cells. How would I go about doing that? Thanks for any more help. "Nichevo" wrote in message ... Yes is perfectly possible you could use something like this Sub HideRows Dim Searchtxt As String Dim ws As Worksheet Searchtxt = "case" Set ws = ThisWorkbook.Worksheets("Name of Worksheet") For row = 2 to 100 If ws.Cells(row, 4) < Searchtxt And ws.Cells(row, 4) < "" Then 'Column D is numbered 4 ws.Rows(Row).EntireRow.Hidden = True End If Next row End Sub and it undo it just do: Sub UnHideRows Dim Searchtxt As String Dim ws As Worksheet Searchtxt = "case" Set ws = ThisWorkbook.Worksheet("Name of Worksheet") For row = 2 to 100 ws.Rows(Row).EntireRow.Hidden = false Next row End Sub problem with this is that it looks for an exact match so if its a capital Case it will be false through this is easy to get around using something like the Upper function |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Creating a function to auto hide rows | Excel Worksheet Functions | |||
Hide a Macro | Excel Discussion (Misc queries) | |||
macro to hide row with 0.00 | Excel Worksheet Functions | |||
hide original cells after creating chart | Charts and Charting in Excel | |||
Hide/Unhide Macro bug | Excel Programming |