第1个回答 2020-05-21
用VBA做了一个 Subtest() Dimi,m,n Application.ScreenUpdating=False Fori=3To33 m=Sheets(i).Range("AS65536").End(xlUp).Row Ifm>5Then Forx=6Tom IfSheets(i).Range("AS"&x)>""Then n=Sheets(2).Range("AS65536").End(xlUp).Row+1 arr=Sheets(i).Range("AD"&x).Resize(1,40) Sheets(2).Range("AD"&n).Resize(1,40)=arr EndIf Next EndIf Next Application.ScreenUpdating=True EndSub实际效果看附件吧