How do i calculate the number of red cells?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

i currently have a spreadsheet where cells turn red if the date that has been
entered in them has passed the current date. Is there a formula i can use to
display the sum of all the red cells?
 
Hi
As Frank suggests Bob's website will be a useful tool.
Bob indicates, however, that one of the constraints of his
UDF is that it does not count cells where the color is set
by conditional formatting. In this case you will need to
mimick the formula that sets the conditional formatting.
If column A contains the entry dates and column B contains
the sums you want to add, then

=SUMIF(A1:A4,">"&TODAY(),B1:B4)
will return the sum of all cells in B1:B4 which have a
date greater than today.

HTH
 
Since the color is presumably based on conditional formatting, use SUMIF with
the same formula you used to apply the color, i.e.

=SUMIF(A1:A100,">"&TODAY(),B1:B100)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top