Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I am trying to hide rows based on the values in their cells. all these cells are in column "L" and if the value of the cell is "NA" then i want to hide the entire row. the problems is that some of the rows and therefore cells are merged and i cant figure out how to hide the whole merged row. From what i have, only some of the rows in the merged rows are hidden. here's what i have: With Range("L1:L400") Application.ScreenUpdating = False For i = 1 To .Rows.Count If Cells(i, 12).Value = "NA" Then .Rows(i).EntireRow.Hidden = True Else .Rows(i).EntireRow.Hidden = False End If Next i Application.ScreenUpdating = True I also tried: Dim myAddress As Variant Dim myCell As Range Dim iCtr As Long myAddress = Array("L1:L400") With Worksheets("CTVDOrderDataMapping") For iCtr = LBound(myAddress) To UBound(myAddress) For Each myCell In .Range(myAddress(iCtr)).Cells myCell.EntireRow.Hidden = (myCell.Value = "NA") Next myCell Next iCtr End With I still have the same problem where only some of the rows in the mreged rows are hidden. Please help -- GNN |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Any way to sort rows of data with merged cells???? | Excel Worksheet Functions | |||
hiding columns with merged rows | Excel Discussion (Misc queries) | |||
hiding rows with merged cells using macros | Excel Programming | |||
How to check for cells merged across rows | Excel Discussion (Misc queries) | |||
Hiding Columns with Merged Cells | Excel Programming |