Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am trying to use this code to hide a row. Am I using a property that
doesn't work? I do not get any error messages... I just do not get the desired results. If MyNewArchHide = True Then For i = 1 To rng.Count If cName(i) = "Transaction Date" Then Set rng2 = .Range(.Cells(1, i), .Cells(2 ^ 16, i).End(xlUp)) For j = rng2.Count To 2 Step -1 If .Cells(j, i).Value LowYear _ And .Cells(j, StatusColumn).Value = "Archive" Then Rows(j).Select HideSelection = True End If Next j End If Next i End If |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try:
Selection.EntireColumn.Hidden = True "Mark" wrote: I am trying to use this code to hide a row. Am I using a property that doesn't work? I do not get any error messages... I just do not get the desired results. If MyNewArchHide = True Then For i = 1 To rng.Count If cName(i) = "Transaction Date" Then Set rng2 = .Range(.Cells(1, i), .Cells(2 ^ 16, i).End(xlUp)) For j = rng2.Count To 2 Step -1 If .Cells(j, i).Value LowYear _ And .Cells(j, StatusColumn).Value = "Archive" Then Rows(j).Select HideSelection = True End If Next j End If Next i End If |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
selection.entirerow.hidden = true
?? or just rows(j).hidden = true (and get rid of the .select line) JNW wrote: Try: Selection.EntireColumn.Hidden = True "Mark" wrote: I am trying to use this code to hide a row. Am I using a property that doesn't work? I do not get any error messages... I just do not get the desired results. If MyNewArchHide = True Then For i = 1 To rng.Count If cName(i) = "Transaction Date" Then Set rng2 = .Range(.Cells(1, i), .Cells(2 ^ 16, i).End(xlUp)) For j = rng2.Count To 2 Step -1 If .Cells(j, i).Value LowYear _ And .Cells(j, StatusColumn).Value = "Archive" Then Rows(j).Select HideSelection = True End If Next j End If Next i End If -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
MS Excel: hide a selection of data (not an entire row or column)? | Excel Discussion (Misc queries) | |||
Hide a CELL (not entire row or column) when printing | Excel Discussion (Misc queries) | |||
Hide an entire tab. | Excel Worksheet Functions | |||
Hide/Delete entire rows based in the content of one cell | Excel Discussion (Misc queries) | |||
Hide Unapplicable Ranges of Entire Rows | Excel Programming |