Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
conditional statement; is that what i need to use? vasi New Users to Excel 10 October 20th 08 07:12 PM
conditional if statement scott Excel Worksheet Functions 1 September 8th 08 12:36 PM
CONDITIONAL STATEMENT BANJO Excel Worksheet Functions 2 March 31st 08 03:50 PM
Help with this conditional IF statement C-Dawg Excel Discussion (Misc queries) 3 May 15th 06 06:01 PM
Conditional if statement Matt Stanley Excel Worksheet Functions 2 November 10th 04 04:47 AM


All times are GMT +1. The time now is 11:42 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"