PC Review


Reply
Thread Tools Rate Thread

Conditional Formating (If statements)

 
 
Marc
Guest
Posts: n/a
 
      6th Apr 2010
In the conditional formatting box how would I make B4 turn yellow if F12 is
between 10 and 15?
 
Reply With Quote
 
 
 
 
ryguy7272
Guest
Posts: n/a
 
      6th Apr 2010
Right-click Sheet, click 'View Code', and paste this into the window that
opens:

Private Sub Worksheet_Change(ByVal Target As Range)
Dim rnArea As Range
Dim rnCell As Range

With rnCell
If Range("F12").Value >= 10 And Range("F12").Value <= 15 Then

Range("B4").Interior.ColorIndex = 6
Else: Range("B4").Interior.ColorIndex = 0

End If
End With
End Sub


--
Ryan---
If this information was helpful, please indicate this by clicking ''Yes''.


"Marc" wrote:

> In the conditional formatting box how would I make B4 turn yellow if F12 is
> between 10 and 15?

 
Reply With Quote
 
Gord Dibben
Guest
Posts: n/a
 
      6th Apr 2010
Select B4 and CF>Use a formula

=AND(F12>10,F4<15) taking your "between" literally.

Maybe you meant

=AND(F12>=10,F12<=15)


Gord Dibben MS Excel MVP

On Tue, 6 Apr 2010 11:26:26 -0700, Marc <(E-Mail Removed)>
wrote:

>In the conditional formatting box how would I make B4 turn yellow if F12 is
>between 10 and 15?


 
Reply With Quote
 
Rod
Guest
Posts: n/a
 
      6th Apr 2010

"Marc" <(E-Mail Removed)> wrote in message
news:7D97D312-8442-4394-857D-(E-Mail Removed)...
> In the conditional formatting box how would I make B4 turn yellow if F12
> is
> between 10 and 15?


select cell B4
Select from menus
format
conditional formatting

from drop down in popup select Formula Is

put in condition

=AND($F$12>10,$F$12<15)

Select desired format.

When I did this it did not work until I had put something into B4. I could
then remove it and it still worked.
Maybe a small bug in excel.



 
Reply With Quote
 
Project Mangler
Guest
Posts: n/a
 
      6th Apr 2010
Marc,

In B4 I'd put =IF(OR(F12<10,F12>15),"",F12)
colour the font yellow to match the background if you don't want to see a
number in B4

In Format/Conditional Formatting
Cell Value is Between 10 and 15
Click the format tab, select patterns and choose a yellow colour.


"Marc" <(E-Mail Removed)> wrote in message
news:7D97D312-8442-4394-857D-(E-Mail Removed)...
> In the conditional formatting box how would I make B4 turn yellow if F12

is
> between 10 and 15?



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Conditional If Statements jesoldano@gmail.com Microsoft Excel Misc 2 3rd Sep 2008 04:18 PM
Conditional Statements dmaioran Microsoft Excel Programming 3 14th Jul 2008 04:48 PM
Install dates formating using conditional formating? Jerry Eggleston Microsoft Excel Misc 2 9th Nov 2005 05:49 PM
Conditional Formating multible if statements =?Utf-8?B?Um95?= Microsoft Excel Misc 4 22nd Jul 2005 09:34 PM
Conditional Statements Brig Siton Microsoft Access Form Coding 3 10th Jul 2005 12:38 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:31 AM.