參考網址:如何在Excel中刪除括號中的內容?
ctrl+m 處理計時決賽(複製本身這一列,然後改成預賽和決賽)
Sub a() ' ' 巨集1 巨集 ' 將計時決賽分成預賽與決賽 ' ' 快速鍵: Ctrl+m ' ActiveCell.Rows("1:1").EntireRow.Select Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove ActiveCell.Offset(1, 0).Rows("1:1").EntireRow.Select Selection.Copy ActiveCell.Offset(-1, 0).Rows("1:1").EntireRow.Select ActiveSheet.Paste ActiveCell.Offset(0, 1).Range("A1").Select Application.CutCopyMode = False ActiveCell.FormulaR1C1 = ActiveCell.Offset(1, 0).Value & "A" ActiveCell.Offset(0, 4).Range("A1").Select ActiveCell.FormulaR1C1 = "預賽" ActiveCell.Offset(1, 0).Range("A1").Select ActiveCell.FormulaR1C1 = "決賽" ActiveCell.Offset(1, 0).Range("A1").Select End Sub
ctrl+b 去除混合運動的(1)
Sub b() ' ' b 巨集 ' 去除混合運動的(1) ' ' 快速鍵: Ctrl+b ' Cells.Replace What:="(*)", Replacement:="", LookAt:=xlPart, SearchOrder _ :=xlByRows, MatchCase:=False, SearchFormat:=False, ReplaceFormat:=False End Sub