用宏就可以,右键工作表标签》查看代码》复制以下代码》关闭弹出窗口》回到excel中》宏》执行宏。
结果在新表中
sub t()
dim arr,brr()
arr=activesheet.usedrange
redim brr(1 to ubound(arr,1)*ubound(arr,2))
k=1
for i=1 to ubound(arr,1)
for j=1 to ubound(arr,2)
if arr(i,j)<>"" then
brr(k)=arr(i,j)
k=k+1
end if
next
next
worksheet.add
worksheets(worksheets.count).[a1].resize(k-1)=application.transpose(brr)
end sub