楼上版主已经给改过来了,完整代码如下。
Sub test()
Dim sht As Worksheet
For Each sht In Sheets
If sht.Name Like "*仓库*" Then
sht.Columns("C").Replace " ", ""
sht.Range("A1").CurrentRegion.Sort key1:=sht.Range("C1"), order1:=xlAscending,header:=xlYes
End If
Next sht
End Sub
Sub test()
Dim sht As Worksheet
For Each sht In Sheets
If sht.Name Like "*仓库*" Then
sht.Columns("C").Replace " ", ""
sht.Range("A1").CurrentRegion.Sort key1:=sht.Range("C1"), order1:=xlAscending
End If
Next sht
End Sub
楼上版主已经给改过来了,完整代码如下。
Sub test()
Dim sht As Worksheet
For Each sht In Sheets
If sht.Name Like "*仓库*" Then
sht.Columns("C").Replace " ", ""
sht.Range("A1").CurrentRegion.Sort key1:=sht.Range("C1"), order1:=xlAscending,header:=xlYes
End If
Next sht
End Sub