Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Conditional statement
I need to include in this conditional statement that when a person enter in
the cell an "N/A" instead of a numerical value, the cell color remain with interior color 8 (cell.Interior.ColorIndex = 8). But now what my macro do is that for "N/A" value in the cell, automatically change the cell color to red (cell.Interior.ColorIndex = 3). How can I rewrite my condition statement for make it this true. My code is as follow: If cell.Value 183 Then MsgBox "Down Time Change Over Goal (Goal = 183 min)!" cell.Interior.ColorIndex = 3 Else cell.Interior.ColorIndex = 8 End If |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Conditional statement
I already resolve the problem but for benefic of everyone else, I will share
it. If cell.Value = "N/A" Then cell.Interior.ColorIndex = 8 ElseIf cell.Value 183 Then MsgBox "Down Time Change Over Goal (Goal = 183 min)!" cell.Interior.ColorIndex = 3 ElseIf cell.Value <= 183 Then cell.Interior.ColorIndex = 8 End If "anamarie30" wrote: I need to include in this conditional statement that when a person enter in the cell an "N/A" instead of a numerical value, the cell color remain with interior color 8 (cell.Interior.ColorIndex = 8). But now what my macro do is that for "N/A" value in the cell, automatically change the cell color to red (cell.Interior.ColorIndex = 3). How can I rewrite my condition statement for make it this true. My code is as follow: If cell.Value 183 Then MsgBox "Down Time Change Over Goal (Goal = 183 min)!" cell.Interior.ColorIndex = 3 Else cell.Interior.ColorIndex = 8 End If |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
conditional statement; is that what i need to use? | New Users to Excel | |||
conditional if statement | Excel Worksheet Functions | |||
CONDITIONAL STATEMENT | Excel Worksheet Functions | |||
Help with this conditional IF statement | Excel Discussion (Misc queries) | |||
Conditional if statement | Excel Worksheet Functions |