For some reason, this is not reading the entire column to till the end? is there any way to fix it? Or anyone can explain why? Please help, thanks.
For i = 1 To intColCount
With .Item(i)
If .On Then
filterArray(i, 1) = .Criteria1
If .Operator Then
MsgBox "Only one filter per column please."
Exit Sub
End If
' debug
' MsgBox filterArray(i, 1)
End If
End With
Next i
intColCount = .Count
For i = 1 To intColCount
If filterArray(i, 1) <> "" Then
WS.Range(Cells(1, i).Address & ":" & _
Cells(1, i).End(xlDown).Address).AdvancedFilter Action:=xlFilterCopy, _
CopyToRange:=Sheets("Value").Range("A1"), Unique:=True
Code:
With .Item(i)
If .On Then
filterArray(i, 1) = .Criteria1
If .Operator Then
MsgBox "Only one filter per column please."
Exit Sub
End If
' debug
' MsgBox filterArray(i, 1)
End If
End With
Next i
intColCount = .Count
For i = 1 To intColCount
If filterArray(i, 1) <> "" Then
WS.Range(Cells(1, i).Address & ":" & _
Cells(1, i).End(xlDown).Address).AdvancedFilter Action:=xlFilterCopy, _
CopyToRange:=Sheets("Value").Range("A1"), Unique:=True
Code: