请高手帮我在excell 中做二个宏?

ys497 2005-03-13 01:09:07
宏1:1,输入评委个数,参加比赛的人数后,自动形成一个表格。
如下: 参赛者 评委1 评委2 评委3 评委4 评委5。。。。评委N 得分 名次
参赛1
参赛2
参赛3
。。。。。。
参赛M
当输入评委的分数后,
宏2: 1,显示参赛1中最高得分变为红色,最低得分为绿色,其得分是去掉一个最高分和一个最低分后的平均分。
2,并按得分高低定其名次,同分名次相同。



...全文
147 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
ys497 2005-03-20
  • 打赏
  • 举报
回复
有那位在excell中做的好的宏(要利用窗体的)的例子发到我的email:ys497@263.net,
本人一定给分,不够再加分。。。。。。。。。。。。。。。。。。
ys497 2005-03-20
  • 打赏
  • 举报
回复
二楼的高手,请你帮忙,因为我正在学习宏操作。
ys497 2005-03-20
  • 打赏
  • 举报
回复
我请人做了一个,但有些命令(有备注)不知如何解,请高手给帮助解决。
Sub j()
Min = 0
R_bc = ActiveCell.Column '不知如何解
Min = ActiveCell.Value
Do Until ActiveCell.Offset(0, i).Value = "" '不知如何解
If Max < ActiveCell.Offset(0, i).Value Then '不知如何解
Max = ActiveCell.Offset(0, i).Value
max_c = i
End If

If Min > ActiveCell.Offset(0, i).Value Then '不知如何解
Min = ActiveCell.Offset(0, i).Value
min_c = i
End If

Sum = Sum + ActiveCell.Offset(0, i).Value
i = i + 1
Loop

ActiveCell.Offset(0, max_c).Font.ColorIndex = 3
ActiveCell.Offset(0, min_c).Font.ColorIndex = 4

ActiveCell.Offset(0, i).Font.ColorIndex = 5 '6


ActiveCell.Offset(0, i).NumberFormatLocal = "0.00_ "
ActiveCell.Offset(0, i).Value = (Sum - Max - Min) / (i - 2)

If Not ActiveCell.Offset(1, 0).Value = "" Then '不知如何解
ActiveCell.Offset(1, 0).Activate '不知如何解
Call j '不知如何解
End If

End Sub
yigepure 2005-03-18
  • 打赏
  • 举报
回复
这个用函数+单元格格式即可得到你要的效果.干嘛非要宏呢
ys497 2005-03-16
  • 打赏
  • 举报
回复
我请人做了一个,但不知各个命令如何解,请高手给帮助解决。
Sub j()
Min = 0
R_bc = ActiveCell.Column
Min = ActiveCell.Value
Do Until ActiveCell.Offset(0, i).Value = ""
If Max < ActiveCell.Offset(0, i).Value Then
Max = ActiveCell.Offset(0, i).Value
max_c = i
End If

If Min > ActiveCell.Offset(0, i).Value Then
Min = ActiveCell.Offset(0, i).Value
min_c = i
End If

Sum = Sum + ActiveCell.Offset(0, i).Value
i = i + 1
Loop

ActiveCell.Offset(0, max_c).Font.ColorIndex = 3
ActiveCell.Offset(0, min_c).Font.ColorIndex = 4

ActiveCell.Offset(0, i).Font.ColorIndex = 5 '6


ActiveCell.Offset(0, i).NumberFormatLocal = "0.00_ "
ActiveCell.Offset(0, i).Value = (Sum - Max - Min) / (i - 2)

If Not ActiveCell.Offset(1, 0).Value = "" Then
ActiveCell.Offset(1, 0).Activate
Call j
End If

End Sub


1,508

社区成员

发帖
与我相关
我的任务
社区描述
Windows专区 非技术区
社区管理员
  • 非技术区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧