werner123
04-12-2017, 04:01 AM
Good day
Can someone please assist , Macro needs to skip (Pass) hidden rows and only work on visible rows , without the SpecialCells(xlCellTypeVisible) ,Macro work fine but it includes hidden rows
Sub create
BeginRow = 5
EndRow = 1000
ChkCol = 47
For RowCnt = BeginRow To EndRow
If Cells(RowCnt, ChkCol).SpecialCells(xlCellTypeVisible).value = True Then 'Get type mismacth error
Cells(RowCnt, ChkCol).Select
Cells(Application.ActiveCell.row, 21).value = 1
End If
Next RowCnt
End Sub
Thank you
Can someone please assist , Macro needs to skip (Pass) hidden rows and only work on visible rows , without the SpecialCells(xlCellTypeVisible) ,Macro work fine but it includes hidden rows
Sub create
BeginRow = 5
EndRow = 1000
ChkCol = 47
For RowCnt = BeginRow To EndRow
If Cells(RowCnt, ChkCol).SpecialCells(xlCellTypeVisible).value = True Then 'Get type mismacth error
Cells(RowCnt, ChkCol).Select
Cells(Application.ActiveCell.row, 21).value = 1
End If
Next RowCnt
End Sub
Thank you