B
barkiny
i want to write a macro when a cell gives error then hide the entire row
(
#VALUE! )
Sub HideRows()
BeginRow = 1
EndRow = 10
ChkCol = 2
For RowCnt = BeginRow To EndRow
If Cells(RowCnt, ChkCol).Value = "-" Then
Cells(RowCnt, ChkCol).EntireRow.Hidden = True
Else
Cells(RowCnt, ChkCol).EntireRow.Hidden = False
End If
Next RowCnt
End Sub
thanks in advance
(
#VALUE! )
Sub HideRows()
BeginRow = 1
EndRow = 10
ChkCol = 2
For RowCnt = BeginRow To EndRow
If Cells(RowCnt, ChkCol).Value = "-" Then
Cells(RowCnt, ChkCol).EntireRow.Hidden = True
Else
Cells(RowCnt, ChkCol).EntireRow.Hidden = False
End If
Next RowCnt
End Sub
thanks in advance