Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Cachod1
 
Posts: n/a
Default Calculate percentage based on cells with conditional formatting

I have a column with conditional formatting (criteria 1 = green highlights /
criteria 2 = red highlights). I need to calculate percentages of the red
highlighted cells against the total # of cells (green and red). How do I
count only the red cells so that I can get the percentage?
  #2   Report Post  
JE McGimpsey
 
Posts: n/a
Default

use the same condition in the CF in the formula...

In article ,
"Cachod1" wrote:

I have a column with conditional formatting (criteria 1 = green highlights /
criteria 2 = red highlights). I need to calculate percentages of the red
highlighted cells against the total # of cells (green and red). How do I
count only the red cells so that I can get the percentage?

  #3   Report Post  
Cachod1
 
Posts: n/a
Default

How do I write that formula? I tried =COUNTIF(N1:N382,"<today()") , but
it doesn't work.



"JE McGimpsey" wrote:

use the same condition in the CF in the formula...

In article ,
"Cachod1" wrote:

I have a column with conditional formatting (criteria 1 = green highlights /
criteria 2 = red highlights). I need to calculate percentages of the red
highlighted cells against the total # of cells (green and red). How do I
count only the red cells so that I can get the percentage?


  #4   Report Post  
JE McGimpsey
 
Posts: n/a
Default

Try

=COUNTIF(N1:N382,"<" & TODAY())

In article ,
"Cachod1" wrote:

How do I write that formula? I tried =COUNTIF(N1:N382,"<today()") , but
it doesn't work.

  #5   Report Post  
Cachod1
 
Posts: n/a
Default

Something still not right. Formula gives me a result of 186. I only have a
TOTAL of 183 rows and only 181 of them meet the criteria. Why am I getting
186?

Also, how can I include a second condition from another column into this
formula?
For example, I want to include in my final count all cells in column N that
meet both of the following conditions: from column N that are <today's date,
and from column O that are not equal to "x"

Or, how can I write the formula so that it only counts the cells from column
N that are both: <today's date AND that meets the conditional formatting
criteria I set up that highlights the cell if Column O is ="x"?



"JE McGimpsey" wrote:

Try

=COUNTIF(N1:N382,"<" & TODAY())

In article ,
"Cachod1" wrote:

How do I write that formula? I tried =COUNTIF(N1:N382,"<today()") , but
it doesn't work.




  #6   Report Post  
ewan7279
 
Posts: n/a
Default

Hi,

Try this on a separate spreadsheet and apply the same principles to your
problem:

In column A, enter random numbers from A1 to A10 between 1 and 20.

In column B1, enter the formula '=IF(A1<10,"Red","Green")' and drag it down
to B10. This will display 'Red' if the number in column A is less than ten
and 'Green' if it is not.

In column C, enter randomly some 'x's. In cell D1, enter the formula
'=IF(AND(B1="Green",C1="x"),"BOTH","NOT BOTH"). If cell B1 contains 'Green'
and cell C1 contains an 'x', 'BOTH' will be displayed. This is the only
combination that will cause 'BOTH' to be displayed.

Hopefully you should be able to follow this example through and apply it to
your work.

Ewan.

"Cachod1" wrote:

Something still not right. Formula gives me a result of 186. I only have a
TOTAL of 183 rows and only 181 of them meet the criteria. Why am I getting
186?

Also, how can I include a second condition from another column into this
formula?
For example, I want to include in my final count all cells in column N that
meet both of the following conditions: from column N that are <today's date,
and from column O that are not equal to "x"

Or, how can I write the formula so that it only counts the cells from column
N that are both: <today's date AND that meets the conditional formatting
criteria I set up that highlights the cell if Column O is ="x"?



"JE McGimpsey" wrote:

Try

=COUNTIF(N1:N382,"<" & TODAY())

In article ,
"Cachod1" wrote:

How do I write that formula? I tried =COUNTIF(N1:N382,"<today()") , but
it doesn't work.


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
How can I calculate Vacation Time earned based on length of emplo. Kim Excel Discussion (Misc queries) 2 March 15th 05 08:04 PM
Adding colour to a range of cells based on one of the cells v... McKenna Excel Discussion (Misc queries) 4 March 11th 05 02:25 PM
count duplicate (or, inversely, unique) entries, but based on a condition markx Excel Worksheet Functions 3 March 8th 05 06:57 PM
Percentage of filled cells Carla Bradley Excel Worksheet Functions 1 January 7th 05 05:31 PM
calculate percentage of two cells Suzie Excel Worksheet Functions 4 December 3rd 04 05:27 PM


All times are GMT +1. The time now is 01:20 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"