If e.Col.IsNumeric AndAlso e.Col.Name <> "总分" Then If e.Row.IsNull(e.Col.Name) = False '且该列已经输入内容 If e.Row(e.Col.Name) < 60 Then '如果该列的值小于60 e.Style = "不及格" '那么用"不及格"样式绘制单元格 ElseIf e.Row(e.Col.Name) > 95 Then '如果单元格的值大于95 e.Style = "优秀" '那么用"优秀"样式绘制单元格 End If End If End If
If e.Col.IsNumeric AndAlso e.Col.Name = "周期工时" Then If e.Row.IsNull(e.Col.Name) = False '且该列已经输入内容 If e.Row(e.Col.Name) > 60 Then '如果该列的值小于60 e.Style = "样式1" '那么用"不及格"样式绘制单元格 End If End If End If 怎样把条件改成以下: If e.Col.IsNumeric AndAlso e.Col.Name = "周期工时" Then If e.Row.IsNull(e.Col.Name) = False '且该列已经输入内容 If e.Row(e.Col.Name) > "工作时间"*60/"加工数量" Then e.Style = "样式1" '那么用"不及格"样式绘制单元格 End If End If End If
6楼
mr725 发表于:2010/3/6 18:17:00
照葫芦画瓢啊: If e.Col.IsNumeric AndAlso e.Col.Name = "周期工时" Then If e.Row.IsNull("周期工时") = False If e.Row("周期工时") > e.Row("工作时间")*60/e.Row("加工数量") Then e.Style = "样式1" End If End If End If