《ecel高级应用》由会员分享,可在线阅读,更多相关《ecel高级应用(14页珍藏版)》请在金锄头文库上搜索。
1、 Excel 高级应用 学 号 :120616124姓 名 : 孙 艳一,用宏录制器进行宏编码宏编码: Sub 跨列居中() 跨列居中 MacroRange(A1).Select With Selection.Font .Name = Tahoma .Size = 22 .Strikethrough = False .Superscript = False .Subscript = False .OutlineFont = False .Shadow = False .Underline = xlUnderlineStyleNone .ThemeColor = xlThemeColorLigh
2、t1 .TintAndShade = 0 .ThemeFont = xlThemeFontNone End With Range(A1).Select ActiveCell.FormulaR1C1 = 120616班级学员信息登记表 With ActiveCell.Characters(Start:=1, Length:=6).Font .Name = Tahoma .FontStyle = 常规 .Size = 22 .Strikethrough = False .Superscript = False .Subscript = False .OutlineFont = False .Sha
3、dow = False .Underline = xlUnderlineStyleNone .ThemeColor = xlThemeColorLight1 .TintAndShade = 0 .ThemeFont = xlThemeFontNone End With With ActiveCell.Characters(Start:=7, Length:=9).Font .Name = 宋体 .FontStyle = 常规 .Size = 22 .Strikethrough = False .Superscript = False .Subscript = False .OutlineFon
4、t = False .Shadow = False .Underline = xlUnderlineStyleNone .ThemeColor = xlThemeColorLight1 .TintAndShade = 0 .ThemeFont = xlThemeFontNone End With Range(A2).Select ActiveCell.FormulaR1C1 = 学号 With ActiveCell.Characters(Start:=1, Length:=2).Font .Name = 宋体 .FontStyle = 常规 .Size = 11 .Strikethrough
5、= False .Superscript = False .Subscript = False .OutlineFont = False .Shadow = False .Underline = xlUnderlineStyleNone .ThemeColor = xlThemeColorLight1 .TintAndShade = 0 .ThemeFont = xlThemeFontNone End With Range(B2).Select ActiveCell.FormulaR1C1 = 姓名 With ActiveCell.Characters(Start:=1, Length:=2)
6、.Font .Name = 宋体 .FontStyle = 常规 .Size = 11 .Strikethrough = False .Superscript = False .Subscript = False .OutlineFont = False .Shadow = False .Underline = xlUnderlineStyleNone .ThemeColor = xlThemeColorLight1 .TintAndShade = 0 .ThemeFont = xlThemeFontNone End With Range(C2).Select ActiveCell.Formu
7、laR1C1 = 性别 With ActiveCell.Characters(Start:=1, Length:=2).Font .Name = 宋体 .FontStyle = 常规 .Size = 11 .Strikethrough = False .Superscript = False .Subscript = False .OutlineFont = False .Shadow = False .Underline = xlUnderlineStyleNone .ThemeColor = xlThemeColorLight1 .TintAndShade = 0 .ThemeFont =
8、 xlThemeFontNone End With Range(D2).Select ActiveCell.FormulaR1C1 = 民族 With ActiveCell.Characters(Start:=1, Length:=2).Font .Name = 宋体 .FontStyle = 常规 .Size = 11 .Strikethrough = False .Superscript = False .Subscript = False .OutlineFont = False .Shadow = False .Underline = xlUnderlineStyleNone .The
9、meColor = xlThemeColorLight1 .TintAndShade = 0 .ThemeFont = xlThemeFontNone End With Range(E2).Select ActiveCell.FormulaR1C1 = 出生年月 With ActiveCell.Characters(Start:=1, Length:=4).Font .Name = 宋体 .FontStyle = 常规 .Size = 11 .Strikethrough = False .Superscript = False .Subscript = False .OutlineFont =
10、 False .Shadow = False .Underline = xlUnderlineStyleNone .ThemeColor = xlThemeColorLight1 .TintAndShade = 0 .ThemeFont = xlThemeFontNone End With Range(A3).Select ActiveCell.FormulaR1C1 = 101 Range(B3).Select ActiveCell.FormulaR1C1 = 孙艳 With ActiveCell.Characters(Start:=1, Length:=2).Font .Name = 宋体
11、 .FontStyle = 常规 .Size = 11 .Strikethrough = False .Superscript = False .Subscript = False .OutlineFont = False .Shadow = False .Underline = xlUnderlineStyleNone .ThemeColor = xlThemeColorLight1 .TintAndShade = 0 .ThemeFont = xlThemeFontNone End With Range(C3).Select ActiveCell.FormulaR1C1 = 女 With ActiveCell.Characters(Start:=1, Length:=1).Font .Name = 宋体 .FontStyle = 常规 .Size = 11 .Strikethrough = False .Superscript = False .Subscript = False .OutlineFont = False .Shadow = False .Underline = xlUnderlineStyleNone .ThemeColor = xlThemeColorLight1 .TintAndShade = 0 .ThemeFont = xlThemeFo