GinoZ
Board Regular
- Joined
- Feb 6, 2006
- Messages
- 169
Hey Guys,
different question than I had this morning. I have a specific range (B11:D57). I want to run a macro that hides a row if ALL cells in B,C and D are empty. Most of them have an IF formula in them that does ''" if the criteria is not met. Best thing I found was the following but it also didn't help/
different question than I had this morning. I have a specific range (B11:D57). I want to run a macro that hides a row if ALL cells in B,C and D are empty. Most of them have an IF formula in them that does ''" if the criteria is not met. Best thing I found was the following but it also didn't help/
Code:
Public Sub Hiderows()
Dim LRow As Integer
Dim i As Integer
LRow = Cells(Rows.Count, 1).End(xlUp).Row
For i = 1 To LRow
If Cells(i, "C") = 0 And Cells(i, "D") = 0 And Cells(i, "E") = 0 Then
Rows(i).EntireRow.Hidden = True
End If
Next
End Sub