Hi all I have code below work well but I want to change this line:
<code style="box-sizing: border-box; font-family: inherit; font-size: 1em;">If Sh.Name <> "LocKH" And Sh.Name <> "Ma" Then
to
<code style="box-sizing: border-box; font-family: inherit; font-size: 1em;">If Sh.Name = array(A,B,C,D,E,F) Then
Please help me, thanks./.</code></code></pre>
<code style="box-sizing: border-box; font-family: inherit; font-size: 1em;">If Sh.Name <> "LocKH" And Sh.Name <> "Ma" Then
to
<code style="box-sizing: border-box; font-family: inherit; font-size: 1em;">If Sh.Name = array(A,B,C,D,E,F) Then
Please help me, thanks./.</code></code></pre>
Code:
[COLOR=#141414][FONT=inherit]Option Explicit[/FONT][/COLOR]<code style="box-sizing: border-box; font-family: inherit; font-size: 1em;">
Sub filter()
Application.ScreenUpdating = False
Dim a, b(1 To 65000, 1 To 15), lR, Sh As Worksheet, endR As Long, i As Long, j As Long, k As Long
Dim ii As Long, Data As Variant
Sheets("LocKH").Range("b5:q5000").ClearContents
endR = Sheets("Ma").Range("B" & Rows.Count).End(3).Row + 1
If endR < 4 Then Exit Sub
Data = Sheets("Ma").Range("B3:B" & endR).Value '
endR = UBound(Data) - 1
For Each Sh In ThisWorkbook.Worksheets
[COLOR=#ff0000] If Sh.Name <> "LocKH" And Sh.Name <> "Ma" Then [/COLOR] '
'do something
End If
Next
Application.ScreenUpdating = True </code>[COLOR=#141414][FONT=inherit]End Sub[/FONT][/COLOR]