I am new to VBA and trying to write a code to hide all the rows in a sheet starting from first time it finds 0 in a column until row 1800. I got the code identifying the row number, where the first 0 appears, but get a type mismatch, when trying to use it.
Any help?
Sub HideRowsold()
Dim Row As Long
Sheets("Source_Data").Select
ActiveCell(2, 1).Select
Do While ActiveCell.Value <> 0
ActiveCell.Offset(1, 0).Select
Loop
RowN = ActiveCell.Row
Rows("RowN:1800").Select (this is where I get type mismatch)
Selection.EntireRow.Hidden = True
End Sub