Public Sub split() cWBName = ActiveWorkbook.Name cWBFullName = ActiveWorkbook.FullName cWBPath = ActiveWorkbook.Path Dim cWB As Workbook Set cWB = ActiveWorkbook Dim cWS As Worksheet Set cWS = ActiveSheet cFolderName = cWBPath & "\" & Left(cWBName, Len(cWBName) - 4) 'MkDir (cWBPath & "\" & Left(cWBName, Len(cWBName) - 3)) 'Dim fs As New FileSystemObject Set fs = CreateObject("Scripting.FileSystemObject") If Not fs.FolderExists(cFolderName) Then fs.CreateFolder (cFolderName) End If Set cRow1 = cWS.Range("1:1").Find("物料组") cColNo = cRow1.Column Set cRows = cWS.Columns(cColN