I have the following lines of code all it is suppost to do hide the rows where the value in range(b4:B49) are blank/empty. but it is not working.
For lngRow = 4 To 49 'Rows 4 thru 49
With Sht
For Col = 2 To 2 'Column B
If .Cells(lngRow, Col) <> 0 Then Exit For
If Col = 2 Then .Rows(lngRow).Hidden = True
For lngRow = 4 To 49 'Rows 4 thru 49
With Sht
For Col = 2 To 2 'Column B
If .Cells(lngRow, Col) <> 0 Then Exit For
If Col = 2 Then .Rows(lngRow).Hidden = True