Sub 流水號()
Columns("A:A").Select
Selection.Insert Shift:=xlToRight
Range("A1").Select
ActiveCell.FormulaR1C1 = "no"
Range("A2").Select
ActiveCell.FormulaR1C1 = "1"
Range("A2").Select
Selection.AutoFill Destination:=Range("A2:A246"), Type:=xlFillSeries
Range("A2:A246").Select
Range("N2").Select
End Sub
Sub 排序()
Range("A1:U246").Sort Key1:=Range("N2"), Order1:=xlAscending, Header:= _
xlGuess, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
SortMethod:=xlStroke, DataOption1:=xlSortNormal
End Sub
Sub 新工作表()
Dim x, sht_name
Sheets(Sheets.Count).Select
Range("N2").Select
While (ActiveCell.Value <> Empty)
If ActiveCell.Value = ActiveCell.Offset(1, 0).Value Then
ActiveCell.Offset(1, 0).Select
Else
sht_name = ActiveCell.Value
ActiveCell.Offset(1, 0).Select
Sheets.Add
x = Sheets.Count - 1
Sheets(x).Name = sht_name
Sheets(Sheets.Count).Select
End If
Wend
End Sub
Sub 資料比對()
Dim x
Sheets(Sheets.Count).Select
Range("A1").Select
For i = 1 To Sheets.Count - 1
x = Sheets(i).Name
Selection.AutoFilter
Selection.AutoFilter Field:=14, Criteria1:=x
Range(Selection, ActiveCell.SpecialCells(xlLastCell)).Select
Selection.Copy
Sheets(x).Select
ActiveSheet.Paste
Application.CutCopyMode = False
Sheets(Sheets.Count).Select
Range("A1").Select
Selection.AutoFilter
Next
End Sub
Sub 資料分類()
流水號
排序
新工作表
資料比對
End Sub
>即時新聞-熱門
2010年12月1日星期三
快速分類
订阅:
博文评论 (Atom)
0 评论:
发表评论