その完了...
次のようにDo untilループを使用しました:
Sub Macro6()
Dim rw As Integer, clm As Integer, clcnt1 As Integer, clcnt2 As Integer, clmcnt As Integer
Dim str As String, str1 As String, str2 As String
rw = 1
clm = 1
clmcnt = 0
Do
clcnt1 = Range("B1").End(xlDown).Row
Rows("1:1").Select
Range("E1").Activate
Selection.AutoFilter
Range("B" & rw).Select
Windows("dfg.xlsx").Activate
clcnt2 = Range("B1").End(xlDown).Row
clmcnt = cntcnt + 1
str = Cells(rw, clm + 1).Value
Selection.Copy
Windows("testing1.xlsm").Activate
ActiveSheet.Range("$B$1:$E$" & clcnt1).AutoFilter Field:=1, Criteria1:=str, Operator:=xlAnd
Windows("dfg.xlsx").Activate
Range("D" & rw).Select
Application.CutCopyMode = False
Selection.Copy
Windows("testing1.xlsm").Activate
Range("D" & rw).Select
str1 = Cells(rw, clm + 3).Value
ActiveSheet.Range("$B$1:$E$" & clcnt1).AutoFilter Field:=3, Criteria1:=str1, Operator:=xlAnd
Range("E" & rw).Select
Windows("dfg.xlsx").Activate
Range("E" & rw).Select
str2 = Cells(rw, clm + 4).Value
Application.CutCopyMode = False
Selection.Copy
Windows("testing1.xlsm").Activate
ActiveSheet.Range("$B$1:$E$" & clcnt1).AutoFilter Field:=4, Criteria1:=str2, Operator:=xlAnd
Windows("dfg.xlsx").Activate
Rows(rw).Select
Range("E" & rw).Activate
Application.CutCopyMode = False
Selection.Copy
Windows("testing1.xlsm").Activate
Rows(rw + 1).Select
Range("E" & rw + 1).Activate
ActiveSheet.Paste
Range("E" & rw).Select
Application.CutCopyMode = False
Selection.AutoFilter
rw = rw + 1
clcnt2 = clcnt2 + 1
Loop Until rw = clcnt2
ActiveWorkbook.Save
End Sub