A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Cell Formatting of a Conditional Statement



 
 
Thread Tools Display Modes
  #1  
Old April 27th, 2010, 09:52 AM posted to microsoft.public.excel.worksheet.functions
RobFJ[_4_]
external usenet poster
 
Posts: 8
Default Cell Formatting of a Conditional Statement

I want to be able to change the background of a cell colour if a second
condition is met - but for the background to remain unchanged if the first
condition is met.

So in the formula below, the background would be yellow if the 'c2'
condition is satisfied.

=if(c10,c1,c2)

My actual formulae are much more complex but if someone can point me in the
right direction in terms of principles that would be great

  #2  
Old April 27th, 2010, 10:12 AM posted to microsoft.public.excel.worksheet.functions
Jacob Skaria
external usenet poster
 
Posts: 5,952
Default Cell Formatting of a Conditional Statement

1. Select the cell/Range (say A1:A10). Please note that the cell reference A1
mentioned in the formula is the active cell in the selection. Active cell
will have a white background even after selection
2. From menu FormatConditional Formatting

Based on your condition either go by 'Cell Value Is' or use
formula...Condition1Select 'Formula Is' and enter the below formula

=A1=5
(If the cell value = 5)

OR (c2 is the condition)
=A1=c2


4. Click Format ButtonPattern and select your color (say Red)
5. Hit OK

PS: If you are using XL2007 Goto Home tabStylesConditional
FormattingManage rulesNew ruleUse a formula to determine which cells to
format. Enter the formula in the box below.

--
Jacob (MVP - Excel)


"RobFJ" wrote:

I want to be able to change the background of a cell colour if a second
condition is met - but for the background to remain unchanged if the first
condition is met.

So in the formula below, the background would be yellow if the 'c2'
condition is satisfied.

=if(c10,c1,c2)

My actual formulae are much more complex but if someone can point me in the
right direction in terms of principles that would be great

  #3  
Old April 27th, 2010, 10:32 AM posted to microsoft.public.excel.worksheet.functions
RobFJ[_4_]
external usenet poster
 
Posts: 8
Default Cell Formatting of a Conditional Statement

Thanks Jacob - the condition suggestion works just as I want it BG

Many thanks

"Jacob Skaria" wrote in message
...
1. Select the cell/Range (say A1:A10). Please note that the cell reference
A1
mentioned in the formula is the active cell in the selection. Active cell
will have a white background even after selection
2. From menu FormatConditional Formatting

Based on your condition either go by 'Cell Value Is' or use
formula...Condition1Select 'Formula Is' and enter the below formula

=A1=5
(If the cell value = 5)

OR (c2 is the condition)
=A1=c2


4. Click Format ButtonPattern and select your color (say Red)
5. Hit OK

PS: If you are using XL2007 Goto Home tabStylesConditional
FormattingManage rulesNew ruleUse a formula to determine which cells to
format. Enter the formula in the box below.

--
Jacob (MVP - Excel)


"RobFJ" wrote:

I want to be able to change the background of a cell colour if a second
condition is met - but for the background to remain unchanged if the
first
condition is met.

So in the formula below, the background would be yellow if the 'c2'
condition is satisfied.

=if(c10,c1,c2)

My actual formulae are much more complex but if someone can point me in
the
right direction in terms of principles that would be great


  #4  
Old April 27th, 2010, 10:44 AM posted to microsoft.public.excel.worksheet.functions
MS-Exl-Learner
external usenet poster
 
Posts: 135
Default Cell Formatting of a Conditional Statement

Not clear whether this is what you are looking for…

Place the cursor in C1 cell and select
FormatConditional FormattingCondition 1Formula Is
=$C10
Then Click the Format command button and choose your desired Font and
Pattern colour and give Ok Twice.

Now place the cursor in C2 cell and select
FormatConditional FormattingCondition 1Formula Is
=$C1=0
Then Click the Format command button and choose your desired Font and
Pattern colour and give Ok Twice.

Assume that you would like to apply the conditional formatting Upto C500
cells. Then place the cursor in C1 cell and extend the selection upto C2 cell
by pressing Shift+Down arrow and press Cntrl+C to copy the selection (C1:C2).

Now place the cursor in C3 cell and extend the selection upto C500 and do
right click and select Paste Special (Note: Paste special will be active once
the copy has done, otherwise you can’t able to select the Paste Special
Option) and select the Formats Option Button and press Ok. Now the
Conditional formatting is applied upto C500 cells.

The C2 cell formula will highlight the C2 cell when C1 is =0.
=$C1=0
The above C2 cell formula will highlight the C2 cell when there is no data
in C2.

So, If you want to set colour for C2 when C1 is =0 and C2 is not blank,
then use the below formula while applying the conditional formatting for C2
cell.
=AND($C1=0,$C2"")

--
Remember to Click Yes, if this post helps!

--------------------
(Ms-Exl-Learner)
--------------------


"RobFJ" wrote:

I want to be able to change the background of a cell colour if a second
condition is met - but for the background to remain unchanged if the first
condition is met.

So in the formula below, the background would be yellow if the 'c2'
condition is satisfied.

=if(c10,c1,c2)

My actual formulae are much more complex but if someone can point me in the
right direction in terms of principles that would be great

 




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 08:46 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.