|
楼主 |
发表于 2024-10-22 12:28
|
显示全部楼层
[广告] VBA代码宝 - VBA编程加强工具 · VBA代码随查随用 · 内置多项VBA编程加强工具 ★ 免费下载 ★ ★ 使用手册★
老师你好,重感几天,现在才有些精神处理,麻烦老师看看N列的代码,“不参评”的显示相对容易,后面名次的赋值一直无法成功,但也没有报错,“count"已在最上方进行定义了,但程序运行后无法按岗位得分高低进行名次的赋值,请指导一下,谢谢
N列:
If crr(dic(drr(i, 1) & "|" & drr(i, 2)), 8) = "不参评" Then
crr(dic(drr(i, 1) & "|" & drr(i, 2)), 14) = "不参评"
End If
If crr(dic(drr(i, 1) & "|" & drr(i, 2)), 5) = "值班站长" And crr(dic(drr(i, 1) & "|" & drr(i, 2)), 8) = "参评" And crr(dic(drr(i, 1) & "|" & drr(i, 2)), 10) > crr(dic(drr(i, 1) & "|" & drr(i, 2)), 10) Then
count = count + 1
ElseIf crr(dic(drr(i, 1) & "|" & drr(i, 2)), 5) = "值班员" And crr(dic(drr(i, 1) & "|" & drr(i, 2)), 8) = "参评" And crr(dic(drr(i, 1) & "|" & drr(i, 2)), 10) > crr(dic(drr(i, 1) & "|" & drr(i, 2)), 10) Then
count = count + 1
ElseIf crr(dic(drr(i, 1) & "|" & drr(i, 2)), 5) = "站务员" And crr(dic(drr(i, 1) & "|" & drr(i, 2)), 8) = "参评" And crr(dic(drr(i, 1) & "|" & drr(i, 2)), 10) > crr(dic(drr(i, 1) & "|" & drr(i, 2)), 10) Then
count = count + 1
crr(dic(drr(i, 1) & "|" & drr(i, 2)), 14) = count + 1
End If |
|