M Marc Apr 6, 2010 #1 In the conditional formatting box how would I make B4 turn yellow if F12 is between 10 and 15?
R ryguy7272 Apr 6, 2010 #2 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
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
G Gord Dibben Apr 6, 2010 #3 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
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
R Rod Apr 6, 2010 #4 Marc said: In the conditional formatting box how would I make B4 turn yellow if F12 is between 10 and 15? Click to expand... 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.
Marc said: In the conditional formatting box how would I make B4 turn yellow if F12 is between 10 and 15? Click to expand... 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.
P Project Mangler Apr 6, 2010 #5 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, 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.