Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 70
Default Conditional Formating (If statements)

In the conditional formatting box how would I make B4 turn yellow if F12 is
between 10 and 15?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,836
Default Conditional Formating (If statements)

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?

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default Conditional Formating (If statements)

Select B4 and CFUse a formula

=AND(F1210,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
wrote:

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


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default Conditional Formating (If statements)


"Marc" wrote in message
...
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$1210,$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.



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 63
Default Conditional Formating (If statements)

Marc,

In B4 I'd put =IF(OR(F12<10,F1215),"",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" wrote in message
...
In the conditional formatting box how would I make B4 turn yellow if F12

is
between 10 and 15?



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 If Statements [email protected] Excel Discussion (Misc queries) 4 September 3rd 08 04:25 PM
Conditional Statements Robert Albrecht Excel Discussion (Misc queries) 2 October 3rd 06 08:29 PM
conditional statements flyingmeatball[_3_] Excel Programming 5 August 21st 06 07:16 PM
Install dates formating using conditional formating? Jerry Eggleston Excel Discussion (Misc queries) 2 November 9th 05 05:49 PM
Conditional Formating multible if statements Roy Excel Discussion (Misc queries) 4 July 22nd 05 09:34 PM


All times are GMT +1. The time now is 03:55 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"