Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Conditional formating question

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Conditional formating question

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 158
Default Conditional formating question

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 82
Default Conditional formating question

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
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 formating question DJ76 Excel Worksheet Functions 4 December 16th 08 02:37 PM
Conditional Formating Question [email protected] Excel Discussion (Misc queries) 6 December 7th 08 12:14 AM
Conditional Formating Question carl Excel Worksheet Functions 4 March 10th 07 11:30 AM
Another Conditional Formating Question RalphSE Excel Worksheet Functions 2 March 16th 06 07:05 PM
Conditional Formating Question terri Excel Discussion (Misc queries) 3 November 27th 05 02:01 AM


All times are GMT +1. The time now is 01:29 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"