Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I amtrying to set up conditional formating, the plan is thus:
If I have numbers in cells M4 & O4 that total 3 or greater, the sum will appear in P4, i.e. I have "1" in M4 and "4" in O4 the value of P4 will be "5" If the value in P4 is equal to or greater than "3" then I want the text in M4 & O4 to be red. Anyone any suggestions how I may achieve this? -- Cheers Peter (Reply to address is a spam trap - pse reply to the group) |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On Fri, 01 Oct 2010 23:40:07 +0100, Petert
wrote: I amtrying to set up conditional formating, the plan is thus: If I have numbers in cells M4 & O4 that total 3 or greater, the sum will appear in P4, i.e. I have "1" in M4 and "4" in O4 the value of P4 will be "5" If the value in P4 is equal to or greater than "3" then I want the text in M4 & O4 to be red. Anyone any suggestions how I may achieve this? Sorry, should have mentioned I'm using Excel 2003 -- Cheers Peter (Reply to address is a spam trap - pse reply to the group) |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I don't have Excel 2003, but I'll give this a try.....
Basically, you will need to monitor whenever cell "P4" experiences a "change" event. If the value of cell P4 changes, test if the value of P4 is greater than 5. If so, then change the font color of your desired cells. The following code works in Excel 2007. Hopefully this will be compatible with Excel 2003. I'm not sure. (Also, this code can probably be simplified even more) '============================================= Private Sub Worksheet_Change(ByVal Target As Range) ' ' Did cell P4 change? (which corresponds to row 4, column 16) ' If (Target.Row = 4) And (Target.Column = 16) Then If Range("P4").value 5 then Range("M4").Font.Color = 255 Range("O4").Font.Color = 255 End If End If End Sub '============================================== hope it works! "Petert" wrote in message ... I amtrying to set up conditional formating, the plan is thus: If I have numbers in cells M4 & O4 that total 3 or greater, the sum will appear in P4, i.e. I have "1" in M4 and "4" in O4 the value of P4 will be "5" If the value in P4 is equal to or greater than "3" then I want the text in M4 & O4 to be red. Anyone any suggestions how I may achieve this? -- |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Peter
Select M4 and O4. Goto FormatConditional formatting... Select cell formula is, enter this formula and format as required =$P43 If you need to apply this to more rows in columns M and O then select the range(s) and repeat the above steps. One thing you don't need to do is change the formula, Excel will automatically adjust it. eg in M5 & O5 it will be =$P53 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Conditional formating question | Excel Worksheet Functions | |||
Conditional Formating Question | Excel Discussion (Misc queries) | |||
Conditional Formating Question | Excel Worksheet Functions | |||
Another Conditional Formating Question | Excel Worksheet Functions | |||
Conditional Formating Question | Excel Discussion (Misc queries) |