- 帖子
- 1018
- 主題
- 15
- 精華
- 0
- 積分
- 1058
- 點名
- 0
- 作業系統
- win7 32bit
- 軟體版本
- Office 2016 64-bit
- 閱讀權限
- 50
- 性別
- 男
- 來自
- 桃園
- 註冊時間
- 2012-5-9
- 最後登錄
- 2022-9-28
|
回復 10# billchenfantasy
land_no_m, land_no_c 每張表都有嗎?- If Not (IsError(Application.Match("land_no_m", .Rows(1), 0)) Or _
- IsError(Application.Match("land_no_c", .Rows(1), 0))) Then
- .[A1].CurrentRegion.Sort Key1:=.Columns(Application.Match("land_no_m", .Rows(1), 0)), _
- Order1:=xlAscending, _
- Key2:=.Columns(Application.Match("land_no_c", .Rows(1), 0)), _
- Order2:=xlAscending, _
- Header:=xlYes
- Else
- MsgBox .Sheets(i).Name & " : Sorting field not found."
- End If
複製代碼 |
|