1,新建一个文件夹,把表格全部放在文件来中,要合并内容的表格把名字全部改为“朱科技”
2,在新建一个空白表格---单击工作表右键---查看代码
3,粘贴代码(代码一定要粘贴在当前SHEET工作表):
4,运行
Sub 合并朱科技()
On Error Resume Next
Sheet1.Cells = ""
Dim FileName As String
Dim WK As Workbook
Dim MyEndRow As Long
Dim Rng As Range
FileName = Dir(ThisWorkbook.Path & "\*.xls")
If FileName <> "" Then
Do
If FileName <> ThisWorkbook.Name Then
N = N + 1
Set WK = Workbooks.Open(ThisWorkbook.Path & "\" & FileName)
MyEndRow = Range("A65536").End(xlUp).Row
WK.Sheets("朱科技").UsedRange.Copy
Range("A" & MyEndRow + 1).PasteSpecial
WK.Close
End If
FileName = Dir
Loop While FileName <> ""
End If
BT = Range("A2").Value
For Each Rng In Range("A3:A" & UsedRange.Rows.Count)
If Rng.Value = BT Then Rng.EntireRow.Delete
Next
MsgBox "处理完毕!共处理文件" & N & "个."
End Sub