Hi,
Is there a formula that will count the number of colored cells that formatted by Conditional Formatting.
I would like to know the number of Green and Red cells that have been highlighted by CF.
Thanks.
Hi,
Is there a formula that will count the number of colored cells that formatted by Conditional Formatting.
I would like to know the number of Green and Red cells that have been highlighted by CF.
Thanks.
Try using the CF formulas in a couple of COUNTIF formulas.
Ben Van Johnson
Broadly speaking, no, there are not any functions that do that. Functions look at what is "inside" the cell, and formatting is applied "on top" of them.
Instead what you're better off doing is just running a COUNTIF on the range of formatted cells with the same criteria you used to apply the CF in the first place.
Click the [* Add Reputation] Button to thank people for help!
Post Attachment: Click [Go Advanced] under the reply box; then click [Manage Attachments] to launch the attachments dialogue.
Mark Thread Solved: Go to the top of the first post; Select [Thread Tools] dropdown; Pick the [Mark thread as Solved] option.
Thanks.
What would the formula be as my skills formulas are basic.
(How to) Upload a Workbook directly to the Forum
(please do not post pictures or links to worksheets)
- Click Advanced next to Quick Post button at the bottom right of the editor box.
- Scroll down until you see "Manage Attachments",
- Click the "Choose" button at the upper left (upload from your computer).
- Select your file, click "open", click "upload"
- Once the upload is completed the file name will appear below the input boxes in this window.
- Close the Attachment Manager window.
- Click "Submit Reply"
Note: Please do not attach password protected workbooks/worksheets
Ensure to disable any Workbook Open/Autorun macros before attaching!
Sorry attached sample workbook
Please try the attachment again.
What about now?
It looks like your CF is kind of a mess, but aren't you just highlighting the lowest & highest values in each row?
In which case, wouldn't the number of green/red cells each be simply be the number of rows you have filled in, with possibly some error handling for rows with one entry?
Named ranges used:
MaxAndMins =Test!$K$3:$L$35
MaxVals =Test!$K$3:$K$35
MinVals =Test!$L$3:$L$35
supplier_1 =Test!$D$3:$D$35
supplier_2 =Test!$E$3:$E$35
supplier_3 =Test!$F$3:$F$35
supplier_4 =Test!$G$3:$G$35
supplier_5 =Test!$H$3:$H$35
Each row of the sample data has a max and a min value. Use two helper columns to extract the max and mins for each row, then use
M4:V4 supplier names referring to ranges![]()
=SUMPRODUCT(--(INDIRECT(M4)=INDEX(MaxAndMins,,ISEVEN(COLUMN())+1)))
ISEVEN(COLUMN())+1) calculates the column of the max/min table/array to use
Modify, reduce your conditional format formulas (choose four colors)
highlight min/max for each column:
=D3=MIN(INDEX($D$3:$H$35,,COLUMN(A1)))
=D3=MAX(INDEX($D$3:$H$35,,COLUMN(A1)))
highlight min/max for each ROW:
=D3=MIN(INDEX($D$3:$H$35,ROW(A1),))
=D3=MAX(INDEX($D$3:$H$35,ROW(A1),))
Last edited by protonLeah; 03-25-2018 at 02:43 PM.
Is this double posted here: https://www.excelforum.com/excel-gen...sum-total.html ??
Thanks All.
Hi @protonLeah,
Thanks for your help.
I tried the above but it doesn't work as some of the cells are grouped together and also the information needed is from different columns. I have attached the sheet that I am working on.
Perhaps the following will be of some help.
Populate AJ42:DA42 using: =COUNTIFS(AJ3:AJ35,MIN(AJ3:AJ35))
Get a sum of the values in AJ42:DA42 that a visible using: =SUMIFS(AJ42:DA42,AJ2:DA2,"Calc Annual Value*")
Let us know if you have any questions.
Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.
Two column Named ranges for annual calcs for each supplier:
Supplier_A ='Pricing Results Analysis'!$V$3:$W$36
Supplier_B ='Pricing Results Analysis'!$AJ$3:$AK$36
Supplier_C ='Pricing Results Analysis'!$AX$3:$AY$36
Supplier_D ='Pricing Results Analysis'!$BL$3:$BM$36
Supplier_E ='Pricing Results Analysis'!$BZ$3:$CA$36
Supplier_F ='Pricing Results Analysis'!$CN$3:$CO$36
Supplier_G ='Pricing Results Analysis'!$DA$3:$DB$36
Two column named range for extracted max/mins:
MaxAndMins ='Pricing Results Analysis'!$DD$3:$DE$36
There are two summary tables: "Multiple Locations" and "Single Locations".
Counts are tallied with:
INDEX(INDIRECT(DG$3) points to the supplier's named range![]()
=SUMPRODUCT(--(INDEX(INDIRECT(DG$3),,MATCH($DG$2,{"multiple","single"},0))=INDEX(MaxAndMins,,MATCH(DG4,{"max","min"},0))))
MATCH($DG$2,{"multiple","single"},0) determines which column, Multi or single
* Unfortunately, I was not able to test very well due to so many formulas that referred to to empty cells. There are several cells with formulas different from the other formulas in the same column and several circular ref errors.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks