I am trying to do a dynamic "Hide Rows" function where if a certain cell in a row has any value a number "1" will populate the A cell of that row, an example would be if cell B11 has value A11 will be equal to "1"... What I had the macro doing was hiding all rows where A = ""
The code had been working for a long time but then out of nowhere I was hit with "Run-time error '13: Type Mismatch"
Any help would be greatly appreciated and if you are reading this thank you
The code had been working for a long time but then out of nowhere I was hit with "Run-time error '13: Type Mismatch"
Code:
Option Explicit
Dim cel As Range, rng As Range
Sub Example()
Set rng = Range("a1", Range("a65536").End(xlUp))
For Each cel In rng
If cel.Value = "0" Then
cel.EntireRow.Hidden = True
End If
Next cel
End Sub
Any help would be greatly appreciated and if you are reading this thank you