• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Conditional format cells

Thomas Kuriakose

Active Member
Respected Sirs,

A very good day to you.

We are in need to count the colored cells and conditional format cells automatically based on parameter colors.

Kindly find attached the file with the requirement detailed.

For the count I found a UDF function but it counts all colors the same values.

Kindly guide on how to get this done.

Thank you very much for your support always.

with regards,
thomas
 

Attachments

  • Color.xlsm
    15.7 KB · Views: 1
Thomas Kuriakose
As You have checked that functions parameters ... have You?
You have used always same to the 1st parameter ... okay?
The 1st parameter should be set as cell, which color count You would like to get.
... hmm? ... I would use L-column's cells.
ps. where were those conditional formatting cells?
 
Respected Sir,

Thank you very much for your support and guidance.

The function code I copied from below - and have not checked
https://www.extendoffice.com/documents/excel/1155-excel-count-sum-cells-by-color.html

We want to count the color for the below cells-

1. The result row C5:G5 - Count the number of green, orange and red and show value in M3,M4 and M5 - this should have auto conditional format based on the color combination in cells C15:C16
2. The parameter rows P1&P2 C15:G16 - Count the number of green, orange and red and show value in M15,M16 and M17.

Now we have only colored the cells, we have not given conditional format to any cell.

I hope I was able to explain.

Thank you very much for your support,

with regards,
thomas
 
Respected Sir,

I have not changed any parameter, copied the code in the module and in the UDF changed the cell references only.

Thank you very much for your guidance,

with regards,
thomas
 
As I wrote ... tried to write ...
in that file,
You try to count always SAME color cells!
... that's copy & paste!
Even try to change the 1st parameter reference to L-column ...
 
Respected Sir,

Apologies, now got it, changed the 1st parameter and now the count is working.

Thank you for this note.

Now how to conditional format to get the result color in C5:G5 based on color combination in C15:G16

Thank you very much once again.

with regards,
thomas
 
yes ...

conditional formatting ...
as You have checked ( or You'll check soon) that code,
there should be solved that.
Have You tested ... how it works?
You should do there some conditional formatting and see ...
I don't 'mess' with conditional formatting and cell colors in same sheet if possible.
 
Respected Sir,

Thank you once again, I have done one conditional format for C5.

For the values of count, how to update the count without double click on UDF in M15,M16,M17 after color change in C15,C16..

Kindly find attached one test on C5.

Thanks,

with regards,
thomas
 

Attachments

  • Color.xlsm
    15.9 KB · Views: 0
Respected Sir,

This also worked, thanks very much,

Kindly check my conditional format, C15 is orange, C16 is green, so C5 should be orange, it is green now, don't know where I am going wrong.

with regards,
thomas
 

Attachments

  • Color.xlsm
    15.9 KB · Views: 2
... yes ...
Have You noticed that cell C5 has TWO rules for 'orange'?
Maybe Excel won't understand Your way to do those rules...
Excel'll understands only Excel's way to make rules.

What have You learnt or have You?
 
Back
Top