【正文】
:A).End(xlDown).Row ‘按第A列數(shù)據(jù)拆分,且第一行無合并單元格ReDim GSArr(1 To 1)GSArr(1) = Cells(2, 1)For i = 3 To Rca If IsError((Cells(i, 1), GSArr, 0)) Then ReDim Preserve GSArr(1 To UBound(GSArr) + 1) GSArr(UBound(GSArr)) = Cells(i, 1) End IfNextIf = False Then Rows(1:1).AutoFilterElse If = True Then End IfFor i = 1 To UBound(GSArr) Field:=1, Criteria1:=GSArr(i) After:=Sheets() = GSArr(i) Sheets(Sn). Sheets(Sn).ActivateNextEnd Sub 將匯總的好的EXCEL表按字段拆分為多個(gè)工作薄代碼如下:Sub CFGZB() Dim myRange As Variant Dim myArray Dim titleRange As Range Dim title As String Dim columnNum As Integer myRange = (prompt:=請選擇標(biāo)題行:, Type:=8) myArray = (myRange) Set t