| 
    
     |  | ▼kanabun さん: 返信ありがとうございます。
 仰られた通りに修正して、かつ必ず条件が合うように全項目を0〜99という範囲で指定してみましたが、すべての行が非表示になるという結果でした。
 また、イミディエイトウインドウを確認したところ、
 [AD3] not(>=p1)
 [AD9] not(>=p1)
 [AD15] not(>=p1)
 [AD21] not(>=p1)
 [AD27] not(>=p1)
 [AD33] not(>=p1)
 [AD39] not(>=p1)
 [AD45] not(>=p1)
 [AD51] not(>=p1)
 [AD57] not(>=p1)
 [AD63] not(>=p1)
 [AD69] not(>=p1)
 [AD75] not(>=p1)
 [AD81] not(>=p1)
 [AD87] not(>=p1)
 [AD93] not(>=p1)
 [AD99] not(>=p1)
 [AD105] not(>=p1)
 [AD111] not(>=p1)
 [AD117] not(>=p1)
 [AD123] not(>=p1)
 [AD129] not(>=p1)
 [AD135] not(>=p1)
 
 という結果となりました。
 この参照しているセル(Sheets(1).Cells(i, "W")など)が純粋な値ではなく、計算式が入っていてあくまで数値が表示されている状態であるため、上手く機能しないのでしょうか?
 
 再度アドバイスをいただければと思います。
 お手数ですが、よろしくお願いいたします。
 
 
 >>Do
 >>
 >>x = i - 1
 >>y = x + 5
 >>
 >>If (h1 <= Sheets(1).Cells(i, "W") And Sheets(1).Cells(i, "W") <= h2) And
 >>(j1 <= Sheets(1).Cells(i, "X") And Sheets(1).Cells(i, "X") <= j2) And
 >>(k1 <= Sheets(1).Cells(i, "Y") And Sheets(1).Cells(i, "Y") <= k2) And
 >>(l1 <= Sheets(1).Cells(i, "Z") And Sheets(1).Cells(i, "Z") <= l2) And
 >>(m1 <= Sheets(1).Cells(i, "AA") And Sheets(1).Cells(i, "AA") <= m2) And
 >>(n1 <= Sheets(1).Cells(i, "AB") And Sheets(1).Cells(i, "AB") <= n2) And
 >>(o1 <= Sheets(1).Cells(i, "AC") And Sheets(1).Cells(i, "AC") <= o2) And
 >>(p1 <= Sheets(1).Cells(i, "AD") And Sheets(1).Cells(i, "AD") <= p2) And
 >>(q1 <= Sheets(1).Cells(i, "AE") And Sheets(1).Cells(i, "AE") <= q2) Then
 >>
 >>Else
 >>Sheets(1).Rows(x & ":" & y).Hidden = True '表示しない 行(i-x)から行((i+5)-x)"
 >>End If
 >>i = i + 6
 >>Loop Until Sheets(1).Cells(i, "D").Value = ""
 >>
 >>----------------------------------------------------------------
 >>入力した条件に当てはまっていても、
 >>Sheets(1).Rows(x & ":" & y).Hidden = True となり
 >>行が非表示となってしまいます。なぜでしょうか?
 >
 >こちらでは(データを作り難く)検証がむつかしいので、
 >うえの部分を以下のように修正して、
 >イミディエイト・ウィンドウでどの列で条件外となっているか
 >確かめてください。
 >With Sheets(1)
 > For i = 3 To .Cells(.Rows.Count, 4).End(xlUp).Row Step 6
 >  x = i - 1
 >  y = i + 4
 >  .Rows(x & ":" & y).Hidden = True '表示しない 行(i-x)から行((i+5)-x)"
 >  Select Case False
 >   Case .Cells(i, "W") >= h1: Debug.Print "[W" & i & "] not(>=h1)"
 >   Case .Cells(i, "W") <= h2: Debug.Print "[W" & i & "] not(<=h2)"
 >   Case .Cells(i, "X") >= j1: Debug.Print "[X" & i & "] not(>=j1)"
 >   Case .Cells(i, "X") <= j2: Debug.Print "[X" & i & "] not(>=j2)"
 >   Case .Cells(i, "Y") >= k1: Debug.Print "[Y" & i & "] not(>=k1)"
 >   Case .Cells(i, "Y") <= k2: Debug.Print "[Y" & i & "] not(>=k2)"
 >   Case .Cells(i, "Z") >= l1: Debug.Print "[Z" & i & "] not(>=L1)"
 >   Case .Cells(i, "Z") <= l2: Debug.Print "[Z" & i & "] not(>=L2)"
 >   Case .Cells(i, "AA") >= m1: Debug.? "[AA" & i & "] not(>=m1)"
 >   Case .Cells(i, "AA") <= m2: Debug.? "[AA" & i & "] not(>=m2)"
 >   Case .Cells(i, "AB") >= n1: Debug.? "[AB" & i & "] not(>=n1)"
 >   Case .Cells(i, "AB") <= n2: Debug.? "[AB" & i & "] not(>=n2)"
 >   Case .Cells(i, "AC") >= o1: Debug.? "[AC" & i & "] not(>=o1)"
 >   Case .Cells(i, "AC") <= o2: Debug.? "[AC" & i & "] not(>=o2)"
 >   Case .Cells(i, "AD") >= p1: Debug.? "[AD" & i & "] not(>=p1)"
 >   Case .Cells(i, "AD") <= p2: Debug.? "[AD" & i & "] not(>=p2)"
 >   Case .Cells(i, "AE") >= q1: Debug.? "[AE" & i & "] not(>=q1)"
 >   Case .Cells(i, "AE") <= q2: Debug.? "[AE" & i & "] not(>=q2)"
 >   Case Else
 >     .Rows(x & ":" & y).Hidden = False
 >  End Select
 > Next
 >End With
 
 |  |