Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Steven
 
Posts: n/a
Default Using "IF" statements

If a returned value=true, how can I change the background color and font?
Can I also add a audio alarm if value=true?
  #2   Report Post  
Steve
 
Posts: n/a
Default

You could use conditional formatting

Format, Conditional Formatting
Cell value is, equal to, TRUE

Select your Font and Background colour.

There's no provision for sound.

The alternative is VBA code to test a range of cells

Sub HighlightTrue()
Dim C As Range
For Each C In Selection
If C.Value = True Then
C.Interior.ColorIndex = 6
C.Font.ColorIndex = 46
Beep
Else
C.Interior.ColorIndex = 0
C.Font.ColorIndex = 1
End If
Next C
End Sub

HTH
Steve





"Steven" wrote in message
...
If a returned value=true, how can I change the background color and font?
Can I also add a audio alarm if value=true?



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
Nested IF statements John Simons Excel Worksheet Functions 14 February 16th 05 06:17 AM
2 If Statements between 2 values Q John Excel Worksheet Functions 4 December 13th 04 03:37 PM
4 different if statements, not working Brian Excel Worksheet Functions 5 December 12th 04 08:17 PM
Unresolved Errors in IF Statements - Errors do not show in results Markthepain Excel Worksheet Functions 2 December 3rd 04 08:49 AM
If statements Mark Excel Worksheet Functions 3 November 2nd 04 08:39 PM


All times are GMT +1. The time now is 05:40 PM.

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"