我现在有一个表,H,O,Q列
H O Q
T 20
F 40
现在我想如果判断当a列的某个单元格为 "T " , b的同行单元格 <30, 显示“过期”
断当a列的某个单元格为 "F " , b的同行单元格> 30, 显示“在保修期中”
小弟我嵌套的条件没学好,不知道怎么用
Sub color()
Dim index As Integer
Dim strRangeO As String
Dim strCol As String
Dim strrangeQ As String
Dim strRangeN As String
Dim strRangeH As String
For index = 3 To 1000
strrangeQ = "q " + CStr(index)
strRangeO = "o " + CStr(index)
strRganeH = "h " + CStr(index)
strIndex = CStr(index) + ": " + CStr(index)
ElseIf (Range(strRangeO).Value > 30) And (Range(strRangeH).Value = f) Then
Range(strrangeQ).Value = "在保修期中 "
Rows(strIndex).Select
With Selection.Interior
.ColorIndex = 3
.Pattern = xlSolid
Selection.Font.ColorIndex = 1
这个提示 方法range作用于对象 '_global '失败。。。求教
------解决方案--------------------------------------------------------
http://community.csdn.net/Expert/topic/5368/5368255.xml?temp=.6700556