如何在所有表格中一次性运行一个宏

Sub成绩计算2()''成绩计算2Macro'宏由asdasd录制,时间:2018/1/21''Range("C71").SelectActiveCell.Formula... Sub 成绩计算2()
'
' 成绩计算2 Macro
' 宏由 asdasd 录制,时间: 2018/1/21
'

'
Range("C71").Select
ActiveCell.FormulaR1C1 = _
"=SUMPRODUCT(LARGE(R[-66]C:R[-2]C,ROW(INDIRECT(""a""&R75C1&"":a""&R76C1))))/R76C1"
Range("C72").Select
ActiveCell.FormulaR1C1 = _
"=SUMPRODUCT(N(LARGE(R[-67]C:R[-3]C,ROW(INDIRECT(""a""&R75C1&"":a""&R76C1)))>=90))/R76C1"
Range("C73").Select
ActiveCell.FormulaR1C1 = _
"=SUMPRODUCT(N(LARGE(R[-68]C:R[-4]C,ROW(INDIRECT(""a""&R75C1&"":a""&R76C1)))>=135))/R76C1"
Range("C74").Select
ActiveCell.FormulaR1C1 = "=R73C1/R71C1"
Range("C75").Select
ActiveCell.FormulaR1C1 = _
"=SUMPRODUCT(N(LARGE(R[-70]C:R[-6]C,ROW(INDIRECT(""a""&R75C1&"":a""&R76C1)))<45))/R76C1"
Range("C76").Select
ActiveCell.FormulaR1C1 = "=R[-5]C*0.4+R[-4]C*40+R[-3]C*10+R[-2]C*10-R[-1]C*10"
Range("D71").Select
ActiveCell.FormulaR1C1 = _
"=SUMPRODUCT(LARGE(R[-66]C:R[-2]C,ROW(INDIRECT(""a""&R75C1&"":a""&R76C1))))/R76C1"
Range("D72").Select
ActiveCell.FormulaR1C1 = _
"=SUMPRODUCT(N(LARGE(R[-67]C:R[-3]C,ROW(INDIRECT(""a""&R75C1&"":a""&R76C1)))>=72))/R76C1"
Range("D73").Select
ActiveCell.FormulaR1C1 = _
"=SUMPRODUCT(N(LARGE(R[-68]C:R[-4]C,ROW(INDIRECT(""a""&R75C1&"":a""&R76C1)))>=108))/R76C1"
Range("D74").Select
ActiveCell.FormulaR1C1 = "=R73C1/R71C1"
Range("D75").Select
ActiveCell.FormulaR1C1 = _
"=SUMPRODUCT(N(LARGE(R[-70]C:R[-6]C,ROW(INDIRECT(""a""&R75C1&"":a""&R76C1)))<36))/R76C1"
Range("D76").Select
ActiveCell.FormulaR1C1 = "=R[-5]C*0.4+R[-4]C*40+R[-3]C*10+R[-2]C*10-R[-1]C*10"
Range("D71:D76").Select
Selection.Copy
Range("E71").Select
ActiveSheet.Paste
Range("F71").Select
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = _
"=SUMPRODUCT(LARGE(R[-66]C:R[-2]C,ROW(INDIRECT(""a""&R75C1&"":a""&R76C1))))/R76C1"
Range("F72").Select
ActiveCell.FormulaR1C1 = _
"=SUMPRODUCT(N(LARGE(R[-67]C:R[-3]C,ROW(INDIRECT(""a""&R75C1&"":a""&R76C1)))>=60))/R76C1"
Range("F73").Select
ActiveCell.FormulaR1C1 = _
"=SUMPRODUCT(N(LARGE(R[-68]C:R[-4]C,ROW(INDIRECT(""a""&R75C1&"":a""&R76C1)))>=90))/R76C1"
Range("F74").Select
ActiveCell.FormulaR1C1 = "=R73C1/R71C1"
Range("F75").Select
ActiveCell.FormulaR1C1 = _
"=SUMPRODUCT(N(LARGE(R[-70]C:R[-6]C,ROW(INDIRECT(""a""&R75C1&"":a""&R76C1)))<30))/R76C1"
Range("F76").Select
ActiveCell.FormulaR1C1 = "=R[-5]C*0.4+R[-4]C*40+R[-3]C*10+R[-2]C*10-R[-1]C*10"
Range("F71:F76").Select
Selection.Copy
Range("G71").Select
ActiveSheet.Paste
Range("H71").Select
ActiveSheet.Paste
Range("I71").Select
ActiveSheet.Paste
End Sub
我想一次性在所有工作表运行上面这个宏,要怎么设置代码
展开
 我来答
折柳成萌
高粉答主

2018-01-22 · 繁杂信息太多,你要学会辨别
知道顶级答主
回答量:4.4万
采纳率:96%
帮助的人:6308万
展开全部
一种办法:选中所有表格,再录制宏。
另一种办法:最简单的办法是用VBA修改宏,枚举每一张表,执行相同的操作步骤。
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式