Print "Excel 七、格式设置(4分):", score7; "分"
八、合并计算(4分)
打开[XLS-3.XLS]文件,在工作表Sheet1中完成以下操作。
⑴在“奖励等级”列用IF函数求出每位职工的奖励等级,当奖励大于300,等级为“高”;奖励大于等于200且小于300,等级为“中”;其余为“低”。
⑵在单元格H2求出奖励的最高值。
Set ex =CreateObject("Excel.Application")
ex.Visible = False
Workbooks.Open FileName:=(App.Path &"\9028\xls-3.xls")
Sheets("Sheet1").Activate
Range("F2").Select
If ActiveCell.FormulaR1C1 = "=IF(RC[-1]>300,""高"",IF(RC[-1]>=200,""中"",""低""))" Or ActiveCell.FormulaR1C1 = "=IF(RC[-1]>300,""高"",IF(RC[-1]<200,""低"",""高""))" Then
score8 = score8 + 2'第(1)小题
End If
Range("H2").Select
If ActiveCell.FormulaR1C1 = "=MAX(RC[-3]:R[15]C[-3])" Then
score8 = score8 + 2'第(2)小题
End If
ex.Visible= False
Workbooks.Close
Print "Excel 八、合并计算(4分):", score8; "分"
九、排序(4分)
打开[XLS-4.XLS]文件,在工作表Sheet1中以“得分”为主关键字(递增),“性别”为次关键字(递减),对工作表数据进行排序。
思路:用排序后的结果,来判定是否得分,这仅仅是一种方法,当然还有其它方法。
Workbooks.OpenFileName:=(App.Path & "\9028\xls-4.xls")
Sheets("Sheet1").Activate
Range("B2").Select
If ActiveCell.FormulaR1C1 = "陈志成" Then score9 = score9 + 2
Range("B21").Select
If ActiveCell.FormulaR1C1 = "温宏文" Then score9 = score9 + 2
ActiveWorkbook.Close
Print"Excel 九、排序(4分):", score9; "分"
十、统计(4分)
打开[XLS-5.XLS]文件,在工作表Sheet1中完成以下操作,完成后以原文件名保存:用“高级筛选”将“心理学”成绩为85以上(不含85)、或者“英语”成绩90以上(含90)的记录,复制到以A30单元格为左上角的输出区域,条件区是以H1单元格为左上角的区域。
Workbooks.OpenFileName:=(App.Path & "\9028\xls-5.xls")
Sheets("Sheet1").Activate
Range("H2").Select
IfActiveCell.FormulaR1C1 = ">85" Then score10 = score10 + 1
Range("I3").Select
IfActiveCell.FormulaR1C1 = ">=90" Then score10 = score10 + 1
Range("A30").Select
IfActiveCell.FormulaR1C1 = "编号" Then score10 = score10 + 1
Range("B38").Select
IfActiveCell.FormulaR1C1 = "王迪" Then score10 = score10 + 1
ActiveWorkbook.Close
Print"Excel 十、统计(4分):", score10; "分"
十一、图表操作(4分)
打开[XLS-6.XLS]文件,根据工作表Sheet1中区域A2:E6的数据创建三维柱形圆柱图,横坐标为科目名称,数值轴为分数(系列产生在行),分类(X)轴标题为“科目名称”,图例在绘图区中靠左显示,图表标题为“学生成绩表”,把生成的图表作为新工作表插入到名为“招工人数统计”的工作表中。
Workbooks.OpenFileName:=(App.Path & "\9028\xls-6.xls")
On Error ResumeNext
Dim tubiao11 As String
tubiao11 = ActiveSheet.Name
If Left(tubiao11,6) = "招工人数统计" Then
Sheets("招工人数统计").Activate
'判定数据源范围是否选对
Dim series1, series2 , series3, series4 As String'图表系列1、2、3、4
series1 = ActiveChart.SeriesCollection(1).Formula '系列1Formula公式表达式
series2 = ActiveChart.SeriesCollection(2).Formula
series3 = ActiveChart.SeriesCollection(3).Formula
series4 = ActiveChart.SeriesCollection(4).Formula
If series1 ="=SERIES(Sheet1!$A$3,Sheet1!$B$2:$E$2,Sheet1!$B$3:$E$3,1)" Andseries4 = "=SERIES(Sheet1!$A$6,Sheet1!$B$2:$E$2,Sheet1!$B$6:$E$6,4)"Then
score11 = score11 + 0.5
Else
Print "数据源错!"
End If '抽取考生图表中的系列1、系列4与要求的数据范围对比,符合要求得分
……
'(其它系列表达式类似,实际中可针对具体选择数据源范围不同增加或减少系列的判断)。
If ActiveChart.ChartType = xlCylinderCol Then
score11 = score11 +0.7'图表类型-三维柱形圆柱图
End If
If ActiveChart.PlotBy = xlRows Then
score11 = score11 +0.7'系列产生在行
End If
If ActiveChart.ChartTitle.Characters.Text = "学生成绩表" Then
score11 = score11 +0.7 '图表标题
End If
If ActiveChart.Axes(xlCategory).AxisTitle.Characters.Text = "科目名称" Then
score11 = score11 + 0.7 '分类(X)轴标题
End If
ActiveChart.Legend.Select
IfSelection.Position = xlLeft Then
score11 = score11 + 0.7'图例靠左
End If
End If
Workbooks.Close
Excel.Application.Quit
Print "Excel 十一、图表操作(4分):", score11; "分"
十二、PowerPoint(10分)
打开 PPT1.ppt,按如下要求进行编辑,完成后以原文件名保存
⑴第1张幻灯片主标题输入:"办公软件考试系统",黑体、44号字;副标题输入:一字公司研制,32号字,右对齐;背景"填充效果"的"纹理"设为"羊皮纸"。论文格式,评价操作题。
Dim ErrStr1211 As String'用于提示出错信息
……
Dim Score1252 As Single '用于记录分值信息
OnError Resume Next
WithActivePresentation.Slides(1).Shapes(1).TextFrame.TextRange
If .Text = "办公软件考试系统" Then
Score1211 = Score1211 + 0.3
ErrStr1211 = ErrStr1211 & "第(1)题 文本内容 设置正确"& vbCrLf
Else
ErrStr1211 = ErrStr1211 & "第(1)题 文本内容 设置错误"& vbCrLf
End If
EndWith
With ActivePresentation.Slides(1).Shapes(1).TextFrame.TextRange
If .Text = "办公软件考试系统" Then
With ActivePresentation.Slides(1).Shapes(1).TextFrame.TextRange.Font
If .NameFarEast = "黑体" Then
Score1212 = Score1212 + 0.3 '黑体
End If
End With
End If
EndWith
WithActivePresentation.Slides(1).Shapes(1).TextFrame.TextRange
If .Text = "办公软件考试系统" Then
With ActivePresentation.Slides(1).Shapes(1).TextFrame.TextRange.Font
If .Size = 44 Then
Score1213 = Score1213 + 0.3'字号
End If
End With
End If
End With
With ActivePresentation.Slides(1).Shapes(2).TextFrame.TextRange
If .Text = "一字公司研制" Then
Score1214 = Score1214 + 0.2 '内容
End If
EndWith
WithActivePresentation.Slides(1).Shapes(2).TextFrame.TextRange
If .Text = "一字公司研制" Then
With ActivePresentation.Slides(1).Shapes(2).TextFrame.TextRange.Font
If .Size = 32 Then
Score1215 = Score1215 + 0.3'字号
EndIf
End With
End If
End With
WithActivePresentation.Slides(1).Shapes(2).TextFrame.TextRange
If .Text = "一字公司研制" Then
IfActivePresentation.Slides(1).Shapes(2).TextFrame.TextRange.ParagraphFormat.Alignment= ppAlignRightThen'右对齐
Score1216 = Score1216 + 0.3
End If
End If
EndWith
WithActiveWindow.Selection.SlideRange.Background
If .Fill.ForeColor.RGB = RGB(255, 255, 204) And .Fill.BackColor.SchemeColor =ppAccent1 Then
Score1217 = Score1217 + 0.3'背景填充效果-羊皮纸
End If
EndWith
Score121= Score1211 + Score1212 + Score1213 + Score1214 + Score1215 + Score1216 +Score1217'第1小题得分汇总
⑵第2张幻灯片的"幻灯片设计"选用"Capsules"设计模版。
If ActivePresentation.TemplateName = "Capsules.pot" Then
Score1221= Score1221 + 2'选用"Capsules"设计模版
End If
Score122= Score1221'第2小题得分汇总
⑶第3张幻灯片,在标题输入"公司介绍",右文本栏插人3行4列表格、左文本栏插入图片tp1.bmp。
With ActivePresentation.Slides(3).Shapes(1).TextFrame.TextRange
If .Text = "公司介绍" Then
Score1231 = Score1231 + 0.4
End If '判定第3张幻灯片上第1个对象“Rectangle2”中的内容
3/4 首页 上一页 1 2 3 4 下一页 尾页 |