Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 6
Default if statement syntax help

I have been reading a lot about conditional formatting. I have cells in D2
that I want highlighted in yellow if g25 and i269%. If g2 and i2 do not
both meet the criteria, I don't want anything to happen to d2. I'm assuming
I can use conditional formating for that, but how do I write it?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 169
Default if statement syntax help

In the conditional formatting wizard, select Formula Is and enter:

=AND(G25,I269%)=TRUE
--
Tips for Excel, Word, PowerPoint and Other Applications
http://www.kan.org/tips


"OfficeManager" wrote:

I have been reading a lot about conditional formatting. I have cells in D2
that I want highlighted in yellow if g25 and i269%. If g2 and i2 do not
both meet the criteria, I don't want anything to happen to d2. I'm assuming
I can use conditional formating for that, but how do I write it?

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default if statement syntax help

No need for =True on the end

=AND(G25,I269%)

Works fine

Mike

"M Kan" wrote:

In the conditional formatting wizard, select Formula Is and enter:

=AND(G25,I269%)=TRUE
--
Tips for Excel, Word, PowerPoint and Other Applications
http://www.kan.org/tips


"OfficeManager" wrote:

I have been reading a lot about conditional formatting. I have cells in D2
that I want highlighted in yellow if g25 and i269%. If g2 and i2 do not
both meet the criteria, I don't want anything to happen to d2. I'm assuming
I can use conditional formating for that, but how do I write it?

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default if statement syntax help

Try this...

Select cell D2
Goto the menu FormatConditional formatting
Select the Formula Is option
Enter this formula in the little box on the right:

=AND(COUNT(G2,I2)=2,G25,I269%)

Click the Format button
Select the desired style(s)
OK out

--
Biff
Microsoft Excel MVP


"OfficeManager" wrote in message
...
I have been reading a lot about conditional formatting. I have cells in D2
that I want highlighted in yellow if g25 and i269%. If g2 and i2 do not
both meet the criteria, I don't want anything to happen to d2. I'm
assuming
I can use conditional formating for that, but how do I write it?



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 6
Default if statement syntax help

Thanks so much. Now, can I count all the cells in column D that have the
conditional formatting of a yellow cell?

"M Kan" wrote:

In the conditional formatting wizard, select Formula Is and enter:

=AND(G25,I269%)=TRUE
--
Tips for Excel, Word, PowerPoint and Other Applications
http://www.kan.org/tips


"OfficeManager" wrote:

I have been reading a lot about conditional formatting. I have cells in D2
that I want highlighted in yellow if g25 and i269%. If g2 and i2 do not
both meet the criteria, I don't want anything to happen to d2. I'm assuming
I can use conditional formating for that, but how do I write it?



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,651
Default if statement syntax help

=sumproduct((G2:G1005)*(I2:I10069%))
--
David Biddulph

"OfficeManager" wrote in message
...
Thanks so much. Now, can I count all the cells in column D that have the
conditional formatting of a yellow cell?

"M Kan" wrote:

In the conditional formatting wizard, select Formula Is and enter:

=AND(G25,I269%)=TRUE
--
Tips for Excel, Word, PowerPoint and Other Applications
http://www.kan.org/tips


"OfficeManager" wrote:

I have been reading a lot about conditional formatting. I have cells
in D2
that I want highlighted in yellow if g25 and i269%. If g2 and i2 do
not
both meet the criteria, I don't want anything to happen to d2. I'm
assuming
I can use conditional formating for that, but how do I write it?



  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default if statement syntax help

Hi,

Counting cells coloured with a conditional format isn't easy but the subject
is covered in depth here.

http://www.xldynamic.com/source/xld.CFConditions.html

If that proves a bit overwhelming then you can count the conditions that set
the conditional format which has the same effect. For example

=SUMPRODUCT((G2:G235)*(I2:I2369%))

Would count that range where both conditions were met on each row.

Mike

"OfficeManager" wrote:

Thanks so much. Now, can I count all the cells in column D that have the
conditional formatting of a yellow cell?

"M Kan" wrote:

In the conditional formatting wizard, select Formula Is and enter:

=AND(G25,I269%)=TRUE
--
Tips for Excel, Word, PowerPoint and Other Applications
http://www.kan.org/tips


"OfficeManager" wrote:

I have been reading a lot about conditional formatting. I have cells in D2
that I want highlighted in yellow if g25 and i269%. If g2 and i2 do not
both meet the criteria, I don't want anything to happen to d2. I'm assuming
I can use conditional formating for that, but how do I write it?

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
need help with syntax of if statement Melody Excel Worksheet Functions 3 February 15th 08 05:05 PM
VBA syntax Sunantoro Excel Discussion (Misc queries) 1 September 21st 05 03:19 AM
If then syntax RL Excel Worksheet Functions 3 June 22nd 05 05:30 AM
when writing an IF statement what is the syntax for "Not Equal to. NEEDTOKNOW Excel Discussion (Misc queries) 1 December 10th 04 04:45 PM
when writing an IF statement what is the syntax for "Not Equal to. NEEDTOKNOW Excel Discussion (Misc queries) 1 December 10th 04 04:32 PM


All times are GMT +1. The time now is 11:05 AM.

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"