[color=darkblue]Sub[/color] Macro2()
[color=green]'[/color]
' Macro2 Macro
[color=green]' Macro recorded 12/11/2007 by QuocAnh[/color]
[color=green]'[/color]
'
Sheet1.Select
Cells.Find(What:="ngay sinh", SearchOrder:=xlByRows).Activate
[color=darkblue]Dim[/color] sodong [color=darkblue]As[/color] [color=darkblue]Long[/color]
sodong = ActiveCell.CurrentRegion.Rows.Count
ActiveCell.Columns("A:A").EntireColumn.Select
Selection.Insert Shift:=xlToRight
ActiveCell.FormulaR1C1 = "cot phu"
ActiveCell.Offset(1, 0).FormulaR1C1 = "=DATE(9999,MONTH(RC[1]),DAY(RC[1]))"
ActiveCell.Offset(1, 0).AutoFill Destination:=ActiveCell.Range("A2:A" & sodong)
ActiveCell.Range("A1").Select
Selection.Sort Key1:=ActiveCell, Order1:= _
xlAscending, Key2:=ActiveCell.Offset(0, -2).Range("A1"), Order2:=xlAscending _
, Header:=xlGuess, OrderCustom:=1, MatchCase:=False, Orientation:= _
xlTopToBottom
ActiveCell.Columns("A:A").EntireColumn.Select
Selection.Delete Shift:=xlToLeft
ActiveCell.Select
[color=darkblue]End[/color] [color=darkblue]Sub[/color]