SOLVED
Home

sum by color when colors are set by conditional formatting

%3CLINGO-SUB%20id%3D%22lingo-sub-36495%22%20slang%3D%22en-US%22%3Esum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-36495%22%20slang%3D%22en-US%22%3E%3CP%3Ei%20have%20a%20column%20of%20numbers%20that%20are%20color%20coded%20(to%20represent%20a%20specific%20mfg%20department)%20and%20I%20need%20to%20total%20the%20values%20by%20color.%20%26nbsp%3BMeaning%20I%20need%20to%20total%20all%20the%20values%20that%20have%20the%20same%20background%20color.%20%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20done%20an%20exhaustive%20search%20online%20and%20was%20able%20to%20quickly%20find%20a%20way%20to%20sum%20by%20color%2C%20unfortunately%20it%20only%20worked%20for%20cells%20whose%20color%20was%20set%20manually%20(NOT%20using%20conditional%20formatting).%20%26nbsp%3BI%20have%20found%20a%20few%20references%20to%20VB%26nbsp%3Bcode%20that%20should%20provide%20the%20functionality%20but%20I%20can't%20get%20any%20of%20them%20to%20run%20(except%20for%20the%20one%20that%20works%20for%20manually%20set%20colors).%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20control%20of%20the%20data%20that%20I'm%20trying%20to%20sum.%20%26nbsp%3Bis%20there%20another%20method%20to%20%22tag%22%20values%3F%20%26nbsp%3BI%20thought%20of%20adding%20a%20letter%20prefix%2C%20but%20coulnd't%20find%20any%20way%20to%20sum%20a%20column%20of%20numbers%20that%20are%20contained%20in%20text%20strings.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAny%20help%20would%20be%20greatly%20appreciated!!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI'm%20using%20Office%20365%20(excel%202016)%20on%20a%20windows%2010%20machine%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-36495%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EMacros%20%26amp%3B%20VBA%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ENeed%20Help%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-390891%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-390891%22%20slang%3D%22en-US%22%3EHi%20yi513%3CBR%20%2F%3E%3CBR%20%2F%3EIt%20is%20because%20the%20range%20you%20used%20in%20the%20UDF%20and%20the%20range%20set%20in%20CF%20are%20not%20matching.%3CBR%20%2F%3E%3CBR%20%2F%3Eexample%20Range%20used%20for%20column%20N%20is%20N%246%3AN%24205%20while%20CF%20set%20is%20%3D%24N%246%3A%24BJ%24205%20%3CBR%20%2F%3E%3CBR%20%2F%3Eplus%20the%20the%20condition%20of%20UDF%20color%20is%20in%20C3%20where%20none%20of%20the%20colors%20in%20the%20range%20%24N%246%3A%24BJ%24205%20matches%20that%20color.%20%3CBR%20%2F%3E%3CBR%20%2F%3Eplease%20read%20my%20earlier%20post%20where%20I%20have%20troubleshooted%20other%20users%20similar%20problems%20and%20that%20will%20give%20you%20guide%20on%20how%20to%20solve%20the%20issue%20on%20your%20workbook.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-388868%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-388868%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F24499%22%20target%3D%22_blank%22%3E%40Jamil%20Mohammad%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHi%20Jamil%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20tried%20your%20code%20but%20it%20returns%20%220%22s.%20Could%20you%20be%20so%20kind%20and%20take%20a%20look%20at%20my%20sample%20file%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-382764%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-382764%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F305887%22%20target%3D%22_blank%22%3E%40soophie6%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIt%20should%20work.%20Can%20you%20upload%20a%20sample%20file%3F%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-382522%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-382522%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F24499%22%20target%3D%22_blank%22%3E%40Jamil%20Mohammad%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHi%20Jamil%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20for%20all%20your%20good%20help%20here.%20I%20copied%20your%20COUNT%20VBA%20but%20there%20is%20problem%20hope%20you%20can%20help%20me%20with%3A%3C%2FP%3E%3CP%3Eif%20the%20conditional%20formatting%20is%20done%20by%20simple%20formula%20like%20%26gt%3B50%20e.g.%20it%20works.%3C%2FP%3E%3CP%3EBut%20my%20conditional%20formatting%20is%20done%20with%20this%20formula%3A%26nbsp%3B%3CSTRONG%3E%3DAND(T3%26lt%3B%3D%24K3%2CT3%26gt%3B%3D(%24K3-%24L3%2B1)).%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSTRONG%3ENow%20it%20doesn't%20work%20anymore.%26nbsp%3B%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3ECan%20you%20help%20out%3F%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSTRONG%3EThanks%20a%20million!%3C%2FSTRONG%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-363412%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-363412%22%20slang%3D%22en-US%22%3Eit%20is%20because%20the%20formula%20logic%20used%20in%20the%20CF%20are%20conflicting%20and%20are%20not%20correct.%3CBR%20%2F%3E%3CBR%20%2F%3Efor%20example%2C%20your%20Math1%20color%20count%20is%2063%20while%20your%20formula%20is%20%3DCOUNTIF(%24F%3A%24F%2C%20%24E2)%20and%20it%20highlights%20112%20however%20the%20reason%20you%20do%20not%20see%20the%20remaining%20colors%20because%20they%20are%20recolored%20by%20other%20CR%20rules%20that%20takes%20precedent.%20so%20to%20make%20this%20work%2C%20you%20should%20properly%20set%20your%20CF%20formulas.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-359857%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-359857%22%20slang%3D%22en-US%22%3E%3CP%3EI%20am%20trying%20to%20use%20your%20formula%2C%20and%20I%20keep%20getting%20zero%20count.%26nbsp%3B%20Here%20is%20my%20file.%26nbsp%3B%20I'm%20hoping%20that%20you%20can%20help%20me.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-356219%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-356219%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F290227%22%20target%3D%22_blank%22%3EArturo89%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EI%20looked%20at%20your%20file.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThere%20was%20a%20lot%20of%20issues%20in%20the%20CF%20range%20%2C%20CF%20formula%20and%20the%20range.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EI%20have%20demonstrated%20in%20the%20attached%20workbook%20how%20the%20CF%20are%20now%20calculating%20correctly.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3Ethings%20i%20changed%20in%20the%20file%20are%20the%20followings%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ERemoved%20the%20CFs%20that%20was%20not%20set%20using%20formulas.%3C%2FP%3E%0A%3CP%3Eremoved%20CFs%20with%20the%20whole%20range%20instead%20of%20per%20row%3C%2FP%3E%0A%3CP%3Eadded%20the%20AND%20operator%20to%20only%20apply%20if%20cell%20is%20not%20blank.%3C%2FP%3E%0A%3CP%3Eapplied%20the%20CF%20on%20row%20F3%20to%20AF3%20and%20then%20used%20Paint%20brush%20to%20duplicate%20it%20for%20all%20other%20rows.%3C%2FP%3E%0A%3CP%3Eyour%20Range%20contained%20mixed%20input%20numbers%20and%20text.%20so%20i%20replaced%20the%20NRs%20with%20blank%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3Eplease%20see%20attached%20workbook.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-355898%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-355898%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F24499%22%20target%3D%22_blank%22%3E%40Jamil%20Mohammad%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you%20for%20all%20that%20you%20have%20done%20in%20this%20thread.%20I've%20read%20through%20it%20all.%20Although%20some%20had%20similar%20issues%2C%20so%20far%20I%20haven't%20read%20one%20that's%20similar%20to%20mine.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHere's%20what%20I%20need...%20For%20each%20row%2C%20there%20are%2027%20cells%20with%20conditional%20formatting.%20Based%20on%20the%20conditional%20formatting%20(using%20formulas%20to%20determine%20the%20format)%2C%20the%20cell%20will%20either%20turn%20(standard)%20green%2C%20yellow%20or%20red.%20At%20the%20very%20end%20up%20each%20row%2C%20I%20have%20three%20more%20columns%3A%20Required%2C%20Completed%2C%20%25%20Completed.%20I%20already%20have%20the%20formulas%20for%20the%20Required%20and%20Percentage%20columns%20figured%20out.%20Now%2C%20I%20simply%20need%20the%20formula%20to%20count%20all%20cells%20that%20have%20the%20standard%20green%20fill%20for%20the%20Completed%20column.%26nbsp%3B%20I%20tried%20what%20you%20have%20kindly%20offered%20on%20this%20thread%2C%20but%20it's%20not%20working%20for%20me.%26nbsp%3BThe%20two%20problems%20I'm%20facing%20are%20below.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSTRONG%3EProblem%20%231%20-%26nbsp%3BThe%20UDF%2Fformula%20does%20not%20count%20after%204%20cells.%26nbsp%3B%3C%2FSTRONG%3E%3CBR%20%2F%3EI%20don't%20know%20why%20this%20happens%2C%20but%20the%20result%20returns%20as%20%23VALUE!%20if%20I%20try%20to%20do%20all%2027%20cells%20in%20a%20row%2C%20but%20once%20you%20edit%20the%20range%20down%20to%20four%20cells%20or%20less%2C%20it%20seems%20to%20work.%26nbsp%3B%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSTRONG%3EProblem%20%232%20-%20The%20UDF%2FFormula%20seems%20to%20count%20all%20cells%2C%20instead%20of%20a%20specific%20color.%3C%2FSTRONG%3E%3CBR%20%2F%3EAlong%20with%20problem%20%231%2C%20the%20formula%20seems%20to%20calculate%20any%20cell%20with%20any%20background%20color.%3CBR%20%2F%3ELet's%20take%20the%20following%20as%20an%20example%3A%20Formula%20%3DCOUNTConditionColorCells(A2%3AC2%2C%24E%242)%3CBR%20%2F%3ECell%20E2%20has%20a%20Standard%20Green%20fill.%20Cells%20in%20A2%3AC2%20all%20have%20the%20background%20color%20of%20Standard%20Green%2C%20so%20the%20result%20is%203.%20Let's%20say%20I%20drag%20the%20formula%20down%20to%20row%203%20now%2C%20which%20consists%20of%20all%20Standard%20Yellow.%20The%20formula%20*should*%20only%20count%20the%20cells%20with%20Standard%20Green%20fill%20(%24E%242)%2C%20right%3F%20In%20my%20case%2C%20it's%20still%20returning%20as%203.%3CBR%20%2F%3E%3CBR%20%2F%3EBased%20off%20what%20I%20read%20in%20this%20thread%2C%20I%20imagine%20it%20something%20having%20to%20do%20with%20the%20conditional%20formatting%20being%20applied%20to%20nonconsecutive%20groups%20of%20cells.%20So%2C%20I%20went%20ahead%20and%20edited%20the%20document%20so%20I%20can%20apply%20each%20rule%20to%20one%2C%20consecutive%20group%20of%20cells.%20Unfortunately%2C%20this%20does%20not%20fix%20the%20problem.%3CBR%20%2F%3E%3CBR%20%2F%3EThere's%20really%20only%20one%20more%20thing%20that%20I%20can%20think%20of%3B%20however%2C%20I%20don't%20know%20if%20that's%20the%20main%20issue.%20There%20are%20some%20cells%20that%20do%20not%20contain%20a%20formula%20for%20conditional%20formatting.%20If%20you%20look%20at%20the%20spreadsheet%2C%20some%20of%20the%20cells%20have%20%22NR%22%20instead%20of%20a%20date.%20So%20the%20conditional%20formatting%20is%20set%20to%20%22if%20contains.%22%20If%20this%20is%20the%20issue...%20what%20kind%20of%20formula%20would%20work%20to%20conditionally%20format%20a%20cell%20if%20it%20contains%20%22NR%22%3F%26nbsp%3B%3CBR%20%2F%3E%3CBR%20%2F%3EI've%20attached%20a%20dummy%20file%20of%20my%20original%20one.%20I%20would%20appreciate%20your%20help%20very%20much!%20I%20would%20like%20the%20formula%20to%20be%20applied%20to%20AH9%3AAH80.%3CBR%20%2F%3E%3CBR%20%2F%3EArturo%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-354888%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-354888%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F288911%22%20target%3D%22_blank%22%3EASharp%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EThanks%20for%20your%20kind%20words.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EI%20looked%20at%20your%20file.%20the%20CFs%20are%20not%20consistent%20with%20the%20range%20used%20in%20the%20UDF.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%3Efor%20example%20the%20red%20color%20range%20in%20CF%20is%26nbsp%3B%3D%24AP%24135%2C%24H%244%3A%24BK%24134%26nbsp%3B%20%26nbsp%3Bdouble%20while%20in%20the%20UDF%20it%20is%20only%26nbsp%3BH%244%3A%24H%24134%26nbsp%3B%20%26nbsp%3B%20if%20you%20read%20my%20previous%20messages%2C%20you%20will%20see%20that%20most%20of%20user%20miss%20this%20part.%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EI%20noticed%20that%20you%20you%20CF%20formulas%20are%20also%20having%20circular%20reference%20issue.%26nbsp%3B%3C%2FP%3E%0A%3CP%3EYou%20can%20simplify%20your%20workbook%20by%20using%20helper%20column%2Fcells%20and%20perhaps%20a%20formula%20solution%20to%20count%20is%20much%20more%20easier%20than%20the%20use%20of%20this%20UDF.%26nbsp%3B%20I%20have%20given%20several%20examples%20in%20the%20earlier%20comments%20on%20this%20thread%20to%20other%20users.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EHope%20it%20helps.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-354840%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-354840%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F24499%22%20target%3D%22_blank%22%3E%40Jamil%20Mohammad%3C%2FA%3E%2C%20firstly%20thanks%20for%20taking%20the%20time%20to%20help%20and%20reply%20to%20so%20many%20members.%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20read%20through%20the%20whole%20thread%20and%20cannot%20find%20the%20solution%20to%20my%20issue.%26nbsp%3B%20Hope%20that%20you%20are%20able%20to%20help.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20trying%20to%20use%20your%20count%20UDF%20to%20count%20the%20number%20of%20cells%20conditionally%20formatted%20either%20red%2Forange%2Fgreen%2Fwhite%20as%20per%20the%20bottom%20of%20the%20table.%26nbsp%3B%20My%20CF%20are%20all%20defined%20by%20a%20function%2C%20and%20ranges%20seem%20to%20match%20up%2C%20colours%20are%20the%20same%20as%20I%20have%20inputted%20the%20RGB%20values.%26nbsp%3B%20I%20am%20still%20getting%20the%20%23VALUE%20error%20in%20rows%20136%20through%20138%2C%20and%20a%200%20count%20in%20row%20139.%26nbsp%3B%20Maybe%20my%20CF%20rules%20are%20too%20complex%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%3C%2FP%3E%3CP%3EAidan%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-354315%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-354315%22%20slang%3D%22en-US%22%3EThank%20you%20very%20much!%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-353536%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-353536%22%20slang%3D%22en-US%22%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F284736%22%20target%3D%22_blank%22%3E%40Imhuman%3C%2FA%3E%3CBR%20%2F%3E%3CBR%20%2F%3EPlease%20read%20my%20earlier%20post%2C%20the%20conditional%20formatting%20needs%20to%20be%20set%20using%20formula.%20%3CBR%20%2F%3Ein%20your%20file%20the%20CF%20is%20not%20set%20using%20formula%2C%20that%20is%20why%20it%20does%20not%20work.%20if%20you%20set%20CF%20with%20formula%20then%20UDF%20will%20work.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-341149%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-341149%22%20slang%3D%22en-US%22%3E%3CP%3Eheyy%20all%2C%3C%2FP%3E%3CP%3Ei%20need%20your%20helps%20about%20%22How%20to%20count%20cells%20by%20colors%20with%20conditional%20formatting%22%3C%2FP%3E%3CP%3Ei%20tried%20ur%20datas%20but%20it%20didnt.%3C%2FP%3E%3CP%3Eits%20so%20important%20for%20me.%3C%2FP%3E%3CP%3EPls%20help%20me.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-339634%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-339634%22%20slang%3D%22en-US%22%3E%3CP%3EHI%20SC_8%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3Eplz%20check%20that%20your%20calculation%20method%20is%20not%20Manual.%20it%20should%20be%20automatic.%20also%20check%20that%20macro%20is%20enabled.%20if%20both%20of%20these%20fails%20then%20open%20the%20module%20and%20insert%26nbsp%3BApplication.Volatile%20just%20after%20the%20second%20line.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F75194i4FB5CFCCB39FB000%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22asdas.jpg%22%20title%3D%22asdas.jpg%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-339277%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-339277%22%20slang%3D%22en-US%22%3E%3CP%3EThank%20you%20very%20much%20for%20helping%20me%2C%20but%20actually%20I%20have%20a%20probelm%20also%20with%20the%20file%20you%20edited.%3C%2FP%3E%3CP%3EWhen%20I%20open%20the%20file%20is%20absolutely%20perfect%2C%20but%20when%20I%20just%20click%20on%20the%20cells%20in%20which%20appears%20the%20number%20of%20colored%20cells%20per%20row%20(without%20making%20any%20kind%20of%20modification)%2C%20it%20appears%20%23VALUE%20and%20there%20is%20no%20way%20to%20make%20it%20work%20again.%20Same%20thing%20if%20I%20continue%20my%20work%20adding%20rows%20and%20I%20try%20to%20drag%20the%20column.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you%20very%20much%20for%20help!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-339274%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-339274%22%20slang%3D%22en-US%22%3E%3CP%3EThank%20you%20very%20much%20for%20helping%20me%2C%20but%20actually%20I%20have%20a%20probelm%20also%20with%20the%20file%20you%20edited.%3C%2FP%3E%3CP%3EWhen%20I%20open%20the%20file%20is%20absolutely%20perfect%2C%20but%20when%20I%20just%20click%20on%20the%20cells%20in%20which%20appears%20the%20number%20of%20colored%20cells%20per%20row%20(without%20making%20any%20kind%20of%20modification)%2C%20it%20appears%20%23VALOR%20and%20there%20is%20no%20way%20to%20make%20it%20work%20again.%20Same%20thing%20if%20I%20continue%20my%20work%20adding%20rows%20and%20I%20try%20to%20drag%20the%20column.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you%20very%20much%20for%20help!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-338991%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-338991%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F278699%22%20target%3D%22_blank%22%3ESC_8%3C%2FA%3E%2C%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EI%20checked%20your%20file.%26nbsp%3B%20There%20CF%20range%20and%20the%20UDF%20used%20range%20in%20UDF%20were%20not%20the%20same.%20I%20modified%20the%20range%20by%20changing%20the%20CF%20for%20each%20row%20separately%20and%20therefore%20the%20UDF%20works%20now.%20plz%20see%20attached.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-338989%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-338989%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20Jo_Nolaj%2C%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EI%20looked%20at%20your%20workbook%2C%20the%20conditional%20formatting%20range%20and%20the%20range%20used%20in%20the%20UDF%20was%20not%20consistent.%20i%20changed%20it%20now%20and%20it%20works.%20plz%20see%20attached.%26nbsp%3B%20please%20note%20that%20instead%20of%204%20CF%20you%20could%20set%20them%20with%20OR%20function%20all%20in%20one.%20plz%20see%20the%20CF%20which%20i%20set.%20the%20only%20thing%20is%20that%20CF%20is%20replicated%20for%20each%20row%20using%20format%20painter.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-338987%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-338987%22%20slang%3D%22en-US%22%3EHi%20Julius835%2C%3CBR%20%2F%3E%3CBR%20%2F%3EAs%20you%20can%20see%20in%20my%20earlier%20post.%20The%20range%20inside%20UDF%20and%20the%20range%20of%20CF%20both%20must%20be%20the%20same%2C%20otherwise%20the%20UDF%20does%20not%20count.%20Perhaps%20It%20would%20be%20easier%20if%20you%20use%20SUMPRODUCT%20function%20to%20count%20conditionally%20based%20on%20multiple%20criteria.%20%3CBR%20%2F%3E%3CBR%20%2F%3EPut%20a%20helper%20column%20next%20to%20column%20E.%20you%20can%20hide%20that%20if%20you%20want.%20put%20real%20dates%20in%20them%20and%20then%20use%20something%20like%20%3DSUMPRODUCT(--(MONTH(F%3AF)%3DMONTH(TODAY()))%2C--(YEAR(F%3AF)%3DYEAR(TODAY())))%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-331756%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-331756%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3EI%20have%20a%20problem%20too%20and%20I%20don't%20know%20how%20to%20fix%20it.%3C%2FP%3E%3CP%3EI%20would%20like%20to%20count%20colored%20cells%20for%20each%20line%20but%20it%20doesn't%20work.%3C%2FP%3E%3CP%3EDo%20you%20maybe%20know%20what's%20wrong%20in%20my%20excel%20file%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-327709%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-327709%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%20Sir%20Jamil!%20Could%20you%20kindly%20help%20me%20how%20to%20make%20the%20UDF%20and%20formula%20you%20shared%20on%20counting%20the%20number%20of%20rows%20colored%20thru%20conditional%20formatting%20work%3F%20I%20copied%20and%20paste%20the%20UDF%20for%20this%20and%20followed%20the%20formula%20in%20your%20attached%20sample%20file%2C%20but%20I%20cannot%20get%20it%20right.%20The%20total%20is%20always%20zero.%20Here's%20the%20file%20I%20am%20working.%20Thank%20you%20very%20much!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-319705%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-319705%22%20slang%3D%22en-US%22%3E%3CP%3EJamil%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you%20for%20your%20response.%20I%20have%20made%20the%20necessary%20changes%20and%20now%20my%20issue%20is%20if%20I%20try%20to%20count%20the%20cells%20only%20in%20certain%20rows%20I%20get%20an%20incorrect%20number.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-319522%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-319522%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3BJulius835%2C%3C%2FP%3E%0A%3CP%3EThere%20are%20several%20issues%20with%20your%20workbook%20that%20is%20why%20UDF%20result%20in%20error.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EI%20thought%2C%20I%20could%20explain%20it%20better%20by%20recording%20a%20video.%20Please%20see%20attached%20workbook%20and%20the%20video.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-319461%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-319461%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20Jamil%2C%20I%20believe%20I've%20done%20everything%20properly%20yet%20it%20still%20displays%20%22%23VALUE!%22%20please%20help%20me.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-297385%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-297385%22%20slang%3D%22en-US%22%3EHi%20%3CBR%20%2F%3EIf%20you%20read%20my%20earlier%20posts.%20you%20will%20see%20that%20I%20mentioned%20that%20for%20the%20UDF%20to%20work.%20CF%20needs%20to%20be%20creating%20using%20formula.%20I%20checked%20your%20CFs%20are%20not%20creating%20using%20Formula%20and%20that%20is%20why%20it%20does%20not%20work.%20If%20you%20change%20your%20CFs%20to%20be%20based%20on%20formula%20then%20it%20will%20work.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-297383%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-297383%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20waran%2C%3C%2FP%3E%0A%3CP%3EI%20checked%20your%20file.%20you%20have%20sent%20Conditional%20formatting%20for%20the%20same%20color%20(i.e%20red)%20on%20the%20same%20range.%20if%20you%20have%20multiple%20condition%20for%20the%20single%20color.%20then%20it%20needs%20to%20be%20put%20in%20one%20single%20formula%2C%20with%20OR%20function.%20the%20UDF%20does%20not%20work%20on%20multiple%20condition%20set%20for%20the%20same%20color%20with%20two%20different%20CF%20rule.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-297370%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-297370%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20Jamil%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20tried%20everything%20and%20even%20inserted%20my%20sheet%20into%20your%20uploaded%20file%20but%20the%20count%20colours%20function%20only%20returns%200%3C%2FP%3E%3CP%3EPlease%20help%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-295625%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-295625%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20Jamil%2C%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20would%20like%20to%20count%20the%20number%20of%20coloured%20cells%20in%20a%20set%20of%20data%20regardless%20of%20the%20numbers%20within%20the%20coloured%20cells.%20These%20colours%20are%20determined%20by%20conditional%20formatting.%20The%20colours%20include%20green%2C%20amber%20and%20red.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20applied%20your%20VBA%20code%20to%20count%20colours%2C%20however%20it%20does%20not%20count%20correctly.%20It%20only%20counts%20the%20amber%20coloured%20cells%20from%20the%20data%20set.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EFrom%20the%20dummy%20data%20I%20have%20attached%2C%20the%20number%20of%20reds%20should%20be%202%2C%20the%20number%20of%20ambers%20should%20be%201%20and%20the%20number%20of%20greens%20should%20be%202.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECould%20you%20please%20have%20a%20look%20at%20the%20dummy%20data%20attached%20to%20determine%20why%20there%20is%20an%20issue%20and%20best%20appropriate%20actions.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20in%20advance%2C%3C%2FP%3E%3CP%3EWaran.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-291593%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-291593%22%20slang%3D%22en-US%22%3EGlad%20to%20hear%20that%20you%20have%20already%20figured%20it%20out.%20Thanks%20for%20the%20feedback.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-291419%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-291419%22%20slang%3D%22en-US%22%3E%3CP%3EJamil%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20for%20replaying.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIt's%20true...%20on%20a%20previous%20post%20I%20said%20that%20the%20code%20you%20gave%20me%20works%20and%20I%20stand%20by%20that.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20request%20after%20that%20was%20of%26nbsp%3Ba%20different%20scenario...%20the%20formulas%20need%20to%20be%20applied%20in%20a%20totally%20different%20way...%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAlso%2C%20I%20already%20deleted%20all%20the%20CF...%20the%20file%20I%20send%20earlier%20belongs%20to%20a%20bigger%20workbook%20where%20all%20that%20conditional%20formatting%20is%20used%20and%20some%20how%20it%20stayed%20(I%20forgot%20to%20check%20and%20clean)%20in%20this%20file%20and%20the%20CF%20even%20linked%20to%20a%20Sheet4...%20The%20CF%20in%20the%20file%20now%20is%20only%20what's%20needed.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EBut%20no%20worries...%20I%20already%20figure%20it%20out...%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EPlease%20see%20attached%20WORKING%20file...%20I%20upload%20it%20here%20for%20reference%20in%20case%20any%20one%20else%20might%20need%20the%20same%20solution.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIf%20you%20inspect%20the%20file%2C%20you%20will%20see%20that%20is%20not%20the%20same%20problem%20although%20is%20has%20to%20do%20with%20counting%20with%20conditional%20formatting...%20which%20is%20what%20this%20thread%20is%20about.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20again%20Jamil.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-291237%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-291237%22%20slang%3D%22en-US%22%3EHi%20Z%20Z%2C%3CBR%20%2F%3E%3CBR%20%2F%3EI%20have%20already%20provided%20you%20the%20solution%20based%20on%20your%20template%20and%20you%20have%20confirmed%20that%20it%20worked.%3CBR%20%2F%3E%20link%20here%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2FExcel%2Fsum-by-color-when-colors-are-set-by-conditional-formatting%2Fm-p%2F288625%2Fhighlight%2Ftrue%23M21674%22%20target%3D%22_blank%22%3Ehttps%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2FExcel%2Fsum-by-color-when-colors-are-set-by-conditional-formatting%2Fm-p%2F288625%2Fhighlight%2Ftrue%23M21674%3C%2FA%3E%3CBR%20%2F%3E%3CBR%20%2F%3EYour%20latest%20file%20have%20several%20issues%3B%20CF%20used%20without%20use%20of%20formula%20and%20formulas%20outside%20the%20CF%20range%20and%20many%20named%20ranges%20with%20broken%20links%20that%20and%20requires%20time%20to%20debug%20and%20analyse%2C%20the%20time%20which%20I%20do%20not%20have.%20As%20I%20only%20contribute%20to%20the%20extend%20possible%20and%20I%20cannot%20dive%20deep%20and%20build%20solutions.%3CBR%20%2F%3E%3CBR%20%2F%3EYou%20can%20post%20new%20questions%20as%20a%20new%20thread%20on%20this%20forum%2C%20perhaps%20other%20Experts%20might%20be%20able%20to%20help%20you.%20Or%20if%20you%20need%20an%20instant%20solution%2C%20you%20can%20hire%20a%20Dev%20for%20an%20hour%20or%20so%2C%20to%20make%20this%20work%20for%20you.%20%3CBR%20%2F%3E%3CBR%20%2F%3EThanks%20for%20your%20understanding.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-290537%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-290537%22%20slang%3D%22en-US%22%3E%3CP%3EJamil%2C%20thank%20you%20for%20helping%20us...%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20six%20clusters%20of%20data%2C%20each%20is%2011%20columns%20by%2070%20rows.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThere%20is%20Conditional%20Formatting%20in%20each%20cluster%20to%20the%20effect%20that%20if%20on%20another%20cell%20(say%20N2)%20I%20type%20a%20value%20and%20that%20value%20is%20found%20within%20all%20the%20six%20clusters%20of%20data%20then%20all%20the%20cells%20containing%20that%20manually%20inputted%20value%20will%20be%20highlighted%20(to%20a%20specific%20color%20that%20I%20already%20set).%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EUp%20to%20that%20point%20all%20is%20fine.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ENow%2C%20I%20need%20to%20display%20MATCH%20FOUND%20when%20all%20cells%20in%20a%20row%20(in%20one%20cluster%20of%20data)%20have%20been%20conditionally%20formatted%20and%20change%20the%20font%20color%20to%20all%20the%20cells%20that%20meet%20the%20criteria.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20know%20it%20sounds%20confusing...%20I'm%20dizzy%20myself...%20but%20to%20illustrate%20the%20scenario%2C%20I%20attached%20a%20file%20with%20dummy%20data.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIn%20the%20attached%20file%2C%20to%20illustrate%20my%20point%2C%20I%20manually%20changed%20the%20FONT%20COLOR%20to%20all%20the%20cells%20that%20meet%20the%20criteria%20(all%20the%20cells%20in%20that%20row%20have%20been%20conditionally%20formatted%20with%20different%20colors%2C%20obviously)%2C%20and%20I%20also%20manually%20added%20at%20the%20bottom%20of%20each%20cluster%20of%20data%20a%20MATCH%20FOUND%20cell%20since%20that's%20what%20I%20also%20need%20to%20see%20as%20I%20manually%20inputted%20specific%20numbers%20(in%20another%20area%20of%20the%20sheet%2C%20N2%20through%20N7)%20that%20I'm%20looking%20for.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20tried%20with%20the%20following%20formulas%20but%20to%20no%20avail%20(the%20VB%20module%20is%20also%20in%20place)...%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3DREPT(%22MATCH%22%2CCOUNT(1%2FMMULT(TRANSPOSE(ROW(P%242%3AZ%2471))%5E0%2CN(P%242%3AZ%2471%3DO2)))%3D11)%20array%20formula%3C%2FP%3E%3CP%3E%3CBR%20%2F%3E%3DIF(SUM(--(MMULT(TRANSPOSE(ROW(P%242%3AZ%2471))%5E0%2C--(O2%3DP%242%3AZ%2471))%26gt%3B0))%3D11%2C%22MATCH%22%2C%22%22)%20regular%20formula%3C%2FP%3E%3CP%3E%3CBR%20%2F%3EIn%20the%20examples%20I%20have%20found%20in%20this%20forum%2C%20they%20count%20how%20many%20cells%20have%20been%20conditionally%20formatted.%20My%20scenario%20is%20slightly%20different%3A%26nbsp%3B%20I%20need%20to%20be%20able%20to%20SEE%20when%20all%20the%20cells%20in%20row%20of%20a%20cluster%20of%20data%20have%20been%20conditional%20formatted%20and%20to%20display%20%22MATCH%20FOUND%22%20and%20change%20the%20font%20color%20of%20those%20cells.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you%20for%20helping.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-289512%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-289512%22%20slang%3D%22en-US%22%3EZ%20Z%20%3CBR%20%2F%3E%3CBR%20%2F%3EGlad%20to%20hear%20that%20it%20works.%20Have%20a%20wonderful%20day%20too.%20thx%20for%20the%20feedback.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-289084%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-289084%22%20slang%3D%22en-US%22%3E%3CP%3EJamil%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you!!!!!%26nbsp%3B%20It%20works%20as%20I%20needed%20it.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHave%20a%20wonderful%20day.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-288625%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-288625%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20Z%20Z%2C%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EYour%20conditional%20formatted%20area%20was%20not%20exactly%20as%20per%20your%20range%20used%20in%20the%20UDF.%3C%2FP%3E%0A%3CP%3EIf%20you%20want%20to%20count%20per%20row%2C%20then%20your%20CF%20should%20be%20per%20row.%26nbsp%3B%20I%20have%20modified%20the%20CF%20and%20now%20it%20works.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3Eplz%20see%20attached.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-288501%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-288501%22%20slang%3D%22en-US%22%3E%3CP%3EHello%20Jamil%2C%20Can%20you%20please%20help%3F%20I%20need%20to%20count%20all%20cells%20in%20a%20range%20(row%20or%20column%2C%20but%20in%20this%20case%20is%20a%20row)%20that%20have%20been%20conditionally%20colored.%20I%20tried%20following%20your%20instructions%20but%20I%20get%20%220%22.%26nbsp%3B%20I%20have%206%20(six)%20clusters%20of%20data%20(ranges)%20which%20I%20have%20assigned%20a%20range%20name.%20The%20conditional%20formatting%20formula%20finds%20all%20cells%20which%20value%20repeats%20in%20all%20clusters%20(if%20the%20number%20does%20not%20repeat%20in%20ALL%20clusters%20then%20the%20cell%20does%20not%20get%20highlighted).%26nbsp%3B%20I%20need%20to%20COUNT%20per%20row%20how%20many%20cells%20are%20highlighted%2C%20and%20I%20have%20to%20be%20able%20to%20do%20the%20same%20with%20all%20rows%20individually.%26nbsp%3B%20Please%20see%20attached%20file.%26nbsp%3B%20Can%20you%20do%20it%20in%20my%20file%20and%20explain%20what%20is%20wrong%3F%20Thank%20you%20Jamil.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-287946%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-287946%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20DG%2C%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThere%20were%20three%20issues%20with%20your%20workbook.%26nbsp%3B%20A)%26nbsp%3B%20it%20was%20based%20on%20the%20font%20color%2C%20which%20I%20have%20modified%20the%20UDF%20to%20take%20the%20font%20color.%26nbsp%3B%20B)%20your%20formula%20in%20conditional%20formatting%26nbsp%3BJ8%26lt%3B%26gt%3BJ%247%26nbsp%3B%20was%20not%20taking%20care%20of%20the%20blank%20cells%2C%20so%20it%20was%20also%20coloring%20the%20font%20of%20the%20blank%20cells%2C%20therefore%2C%20I%20have%20wrapped%20it%20inside%20AND%20function%20like%20this%26nbsp%3B%3DAND(J8%26lt%3B%26gt%3BJ%247%2CJ8%26lt%3B%26gt%3B%22%22)%3C%2FP%3E%0A%3CP%3EC)%20Your%20range%20inside%20the%20UDF%20was%20per%20row%2C%20while%20your%20conditional%20formatted%20range%20was%20the%20entire%20range.%26nbsp%3B%3C%2FP%3E%0A%3CP%3ESo%2C%20I%20have%20changed%20the%20conditional%20formatting%20from%20the%20entire%20range%20to%20the%20single%20row%20using%20format%20painter.%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EPlease%20see%20attached%20workbook%20that%20is%20all%20set.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EHope%20it%20helps.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-286577%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-286577%22%20slang%3D%22en-US%22%3E%3CP%3EAgain%20Thank%20you%20Jamil%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20do%20not%20know%20what%20I%20keep%20messing%20up%2C%20but%20when%20I%20did%20the%20exact%20stuff%20to%20the%20real%20file%20%2C%20I%20keep%20getting%20no%20color.....I%20am%20attaching%20the%20real%20file%20so%20should%20there%20be%20some%20%22file%22%20setting%20differences%20maybe%20we%20can%20resolve.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20wanting%20to%20know%20how%20many%20by%20row%20based%20on%20the%20color%20used%20by%20the%20conditional%20formatting%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-285355%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-285355%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20dg%2C%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3Eyour%20conditional%20formattings%20in%20the%20attached%20file%20had%20some%20issues%20and%20I%20have%20fixed%20them%20in%20the%20attached%20version.%20so%20the%20UDF%20returns%20correct%20result.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3Eregarding%20your%20question%20on%20380%20rows.%26nbsp%3B%20You%20do%20not%20need%20to%20recreate%20condtional%20formatting%20for%20each%20of%20the%20rows.%26nbsp%3B%20you%20can%20use%20the%20format%20painter%20option%20with%20use%20of%20double%20click%20to%20be%20able%20to%20replicate%20the%20conditional%20formatting%20on%20your%20rows.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-285344%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-285344%22%20slang%3D%22en-US%22%3E%3CP%3Ethanks%20Jamil%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EYou%20provided%20a%20total%20count%20%2C%20but%20I%20wanted%20row%20counts.%26nbsp%3B%20I%20altered%20your%20example%2C%20but%20it%20requires%20copying%20formatting%20of%20the%20first%20row%20and%20then%20individually%20copying%20to%20each%20row%20there%20after.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Emy%20real%20sheet%20has%20380%20rows....is%20there%20a%20faster%20way.....if%20I%20select%20all%20of%20the%20rows%20then%20the%20conditional%20formatting%20selection%20inst%20like%20the%20udf%20and%20it%20bombs%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-285319%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-285319%22%20slang%3D%22en-US%22%3EDear%20Shoaib%2C%3CBR%20%2F%3E%3CBR%20%2F%3EYou%20are%20welcome.%20Thanks%20for%20your%20feedback.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-285162%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-285162%22%20slang%3D%22en-US%22%3E%3CP%3EDear%20Jamil%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ethanks%20a%20lot%20for%20your%20favor%20and%20response%2C%20it%20works%20ok.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-285161%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-285161%22%20slang%3D%22en-US%22%3E%3CP%3EDear%20Jamil%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ethanks%20a%20lot%20for%20your%20favor%20and%20response%2C%20it%20works%20ok.%20I%20also%20have%20received%20another%20solution%20(%3CSPAN%3EBosco%3C%2FSPAN%3E)%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3E1%5D%20Define%202%20Names%20%3A%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3E%26nbsp%3B%20%26nbsp%3B%26nbsp%3B%20Select%20B17%20%26gt%3B%26gt%3B%20Define%20Name%20%26gt%3B%26gt%3B%3C%2FSPAN%3E%3CBR%20%2F%3E%26nbsp%3B%20%26nbsp%3B%26nbsp%3B%20%3CSPAN%3EName%20(1)%20%3A%20SumRgn%3C%2FSPAN%3E%3CBR%20%2F%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%3CSPAN%3ERefer%20to%20%3A%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%3DINDEX(%24D%245%3A%24I%2410%2CMATCH(%24A17%2C%24A%245%3A%24A%2410%2C0)%2BMATCH(LOOKUP(%22zz%22%2C%24B%2415%3AB%2415)%2C%7B%22Onsite%22%3B%22OffSite%22%7D%2C0)-1%2C0)%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3EOK%3C%2FSPAN%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSPAN%3EName%20(2)%20%3A%20SumColor%3C%2FSPAN%3E%3CBR%20%2F%3E%26nbsp%3B%20%26nbsp%3B%20%3CSPAN%3ERefer%20to%20%3A%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3E%26nbsp%3B%20%26nbsp%3B%20%3DSUMPRODUCT(0%2B(GET.CELL(63%2CIF(1%2C%2BOFFSET(SumRgn%2C%2CCOLUMN(%24D%244%3A%24I%244)-MIN(COLUMN(%24D%244%3A%24I%244)))))%3DGET.CELL(63%2CB%2416))%2CSumRgn)%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3EOK%3C%2FSPAN%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSPAN%3E2%5D%20In%20B17%2C%20formula%20copied%20across%20to%20G17%20and%20all%20copied%20down%20%3A%3C%2FSPAN%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSTRONG%3E%3D%3C%2FSTRONG%3E%3CSPAN%3ESumColor%3C%2FSPAN%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSPAN%3Ep.s.%20%3A%20Get.Cell()%20is%20a%20Excel%204%20Macro%20function%2C%20so%20you%20need%20to%20save%20file%20as%20Macro-Enable%20Workbook%20xlsm%20type.%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-285149%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-285149%22%20slang%3D%22en-US%22%3EYou%20are%20welcome%20Jos%C3%A9.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-285148%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-285148%22%20slang%3D%22en-US%22%3EThanks%20a%20lot%2C%20Jamil!%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-285123%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-285123%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20dg%2C%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EI%20could%20not%20understand%20the%20second%20file%20you%20shared%2C%20as%20the%20conditional%20formatting%20areas%20were%20inconsistent%20with%20the%20range%20used%20in%20the%20UDF.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EHowever%2C%20I%20understood%20that%20you%20are%20trying%20to%20count%20based%20on%20the%20font%20color%20not%20the%20background%20color.%20therefore%2C%20I%20made%20some%20modification%20to%20the%20UDF%20and%20embedded%20it%20in%20the%20attached%20workbook.%26nbsp%3B%20%26nbsp%3B%3C%2FP%3E%0A%3CP%3Eas%20you%20can%20see%20based%20on%20your%20first%20file.%26nbsp%3B%20it%20works.%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-284791%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-284791%22%20slang%3D%22en-US%22%3EHi%20dg%3CBR%20%2F%3E%3CBR%20%2F%3EI%20am%20not%20home%20now.%20Once%20I%20reach%20home%2C%20I%20will%20take%20a%20look%20at%20your%20excel%20file.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-284773%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-284773%22%20slang%3D%22en-US%22%3E%3CP%3EJamil%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThis%20is%20my%20real%20data%20(extract--no%20names%20and%20a%20few%20rows%2Fcols)....What%20I%20really%20want%20to%20do%20is%20the%20conditional%20formatting%20as%20is%20done%20correctly%20(red%20values%20where%20the%20evaluated%20value%20doesn't%20match%20row%207)%20and%20then%20count%20the%20red%20values%20per%20row%20(col%20a)%3C%2FP%3E%3CP%3EI%20tried%20in%20a%20xlsm%20and%20xls...neither%20has%20worked.%3C%2FP%3E%3CP%3Ethank%20you%20so%20much%2C%3C%2FP%3E%3CP%3Edg%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-284762%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-284762%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20Jamil%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20sent%20you%20a%20msg%2C%20before%20discovering%20this%20thread%20is%20still%20active.%20So%20I%20am%20attaching%20the%20file%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EMy%20conditional%20formatting%20evaluates%20row%2018%20and%20colors%20cells%20A3%3AG16%20if%20the%20corresponding%20A18%3AG18%20value%20doesnt%20match....%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ebut%20as%20you%20can%20see%20something%20is%20really%20hosed%20up.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-282078%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-282078%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20Shoaib%2C%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3Ethough%20your%20question%20is%20not%20related%20to%20this%20thread%2C%20I%20will%20try%20to%20answer%20it.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIn%20your%20example%2C%20you%20can%20make%20your%20SUMIFS%20work%20by%20using%20a%20helper%20column%20and%20also%20a%20UDF%20which%20is%20embedded%20in%20the%20attached%20example%20file.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ESo%20the%20helper%20column%20return%20the%20color%20index%20number%20of%20cell%20background%20as%20you%20can%20see%20in%20the%20attached%20example%20and%20then%20I%20used%20the%20UDF%20in%20the%20helper%20column%20to%20return%20the%20color%20index%20value%20and%20then%20used%20that%20range%20as%20the%20criteria%20range%20for%20the%20SUMIFS%20function.%26nbsp%3B%20Please%20note%20that%20the%20example%20is%20only%20set%20to%20work%20for%20the%20background%20cell%20color%20set%20by%20user%20and%20not%20via%20Conditional%20formatting.%26nbsp%3B%20%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EBesides%2C%20there%20is%20also%20another%20way%20to%20get%20the%20same%20result%20without%20using%20SUMIFS.%3C%2FP%3E%0A%3CP%3Esimply%20use%20auto%20filter%20and%20filter%20by%20the%20desired%20color%20and%20then%20by%20your%20desired%20value%20and%20then%20use%20the%20built%20in%20Subtotal%20function%20to%20sum%20only%20filtered%20cells%20like%20this%26nbsp%3B%3DSUBTOTAL(109%2C%20yoursumrange)%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-281840%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-281840%22%20slang%3D%22en-US%22%3EHi%20Jamil%2C%3CBR%20%2F%3E%3CBR%20%2F%3Erequest%20for%20your%20help%20in%20the%20following%20problem.%3CBR%20%2F%3E%3CBR%20%2F%3EI%20need%20the%20help%20to%20write%20the%20VBA%20code%20or%20standard%20function%20to%20do%20the%20SUMIFS%20-%20with%20both%20criteria%20as%20colour%20and%20value.%3CBR%20%2F%3E%3CBR%20%2F%3EUrgent%20-%20response%20requested.%3CBR%20%2F%3E%3CBR%20%2F%3EShoaib%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-281088%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-281088%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20Matiss%2C%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20UDF%20already%20works%26nbsp%3Bwith%20%22%3CSPAN%3Eonly%20one%20CF%20cell%22%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%3Eattached%20is%20the%20workbook%20that%20demonstrates.%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-281024%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-281024%22%20slang%3D%22en-US%22%3EHi%20Jamil!%3CBR%20%2F%3EThanks%20for%20sharing%20code!%3CBR%20%2F%3E%3CBR%20%2F%3ECan%20this%20code%20be%20modified%20so%20it%20works%20also%20with%20only%20one%20CF%20cell%3F%3CBR%20%2F%3ECurrently%20it%20kind%20of%20works%20also%20with%20one%20cell%2C%20but%20only%20if%20function%20is%20refreshed%20by%20pressing%20%22Enter%22%20on%20particular%20cell%2C%20where%20UDF%20is%20located.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-278843%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-278843%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3CSPAN%3ESylvia%2C%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EI%20have%20modified%20your%20helper%20column%20formulas%20and%20then%20used%20below%20formula%20in%20AP6%20cell%20to%20count%20unique.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EPlease%20remember%20that%20this%20formula%20is%20array%20and%20when%20entering%20it%2C%20requires%20the%20special%20keystroke%20of%20Control%2BShift%2BEnter%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EPlease%20see%20attached%20file%2C%20the%20completed%20version.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%3E%3DSUM(--(FREQUENCY(HolidayWeekends%2CHolidayWeekends)%26gt%3B0))%2BSUM(--(FREQUENCY(HolidayWeekends2%2CHolidayWeekends2)%26gt%3B0))%2BSUM(--(FREQUENCY(PTOW%2CPTOW)%26gt%3B0))%2BSUM(--(FREQUENCY(PTOW2%2CPTOW2)%26gt%3B0))%2BSUM(--(FREQUENCY(FloatingW%2CFloatingW)%26gt%3B0))%2BSUM(--(FREQUENCY(FloatingW2%2CFloatingW2)%26gt%3B0))%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-278245%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-278245%22%20slang%3D%22en-US%22%3E%3CP%3EJamil%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EYou%20are%20simply%20amazing.%26nbsp%3B%20One%20additional%20ask%3A%3C%2FP%3E%3CP%3EI%20want%20to%20count%20the%20unique%20%22adjoining%20weekends%22%20of%20all%20the%20vacation%20times%20I%20entered.%26nbsp%3B%20I%20couldn't%20figure%20out%20a%20%22clean%22%20way%20to%20do%20this%20so%20I%20just%20added%20additional%20columns%20of%20formulas%20that%20I%20will%20hide%20from%20view.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20used%20the%20same%20formula%20you%20provide%20to%20count%20these%20days%20but%20it%20doesn't%20count%20the%20unique%20days%2C%20but%20rather%20all%20the%20days%20in%20the%20designated%20range%20even%20though%20there%20are%20duplicates.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20attached%20the%20file%20so%20you%20could%20see%20my%20updates.%26nbsp%3B%20Hoping%20this%20is%20possible.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%2C%3C%2FP%3E%3CP%3ESylvia%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-276956%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-276956%22%20slang%3D%22en-US%22%3E%3CP%3EHello%20Sylvia%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThere%20is%20no%20need%20to%20overkill%20this%20with%20UDF.%26nbsp%3B%20We%26nbsp%3Bcan%20simply%20use%20the%20built-in%20Excel%20formulas%20to%20achieve%20what%20you%20are%20trying%20to%20get.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThis%20formula%20I%20wrote%20for%20you%20is%20maybe%20not%20easy%20%3CLI-EMOJI%20id%3D%22lia_winking-face%22%20title%3D%22%3Awinking_face%3A%22%3E%3C%2FLI-EMOJI%3E%20but%20it%20does%20the%20job%20and%20it%20is%20also%20dynamic%2C%20so%20if%20your%20year%20changes%2C%20it%20will%20change.%26nbsp%3B%20%26nbsp%3BI%20mean%20the%20cell%20I2%20for%20start%20of%20the%20period%20and%20AG29%20the%20end%20of%20the%20period.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EPlease%20see%20attached%20file%20which%20I%20embedded%20the%20formulasin%20range%26nbsp%3BAO20%3AAO23%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EFor%20counting%20the%20PTO%20vacation%20days%20Formula%26nbsp%3B%3DSUMPRODUCT(--ISNUMBER(MATCH(ROW(INDIRECT(DATEVALUE(%24I%242)%26amp%3B%22%3A%22%26amp%3BDATE(YEAR(DATEVALUE(AG29))%2CMONTH(DATEVALUE(AG29))%2C31)))%2C%24B%243%3A%24B%2435%2C0)))%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EFor%20counting%20Federal%20Holidays%20Formula%26nbsp%3B%3DSUMPRODUCT(--ISNUMBER(MATCH(ROW(INDIRECT(DATEVALUE(%24I%242)%26amp%3B%22%3A%22%26amp%3BDATE(YEAR(DATEVALUE(AG29))%2CMONTH(DATEVALUE(AG29))%2C31)))%2C%24J%2412%3A%24J%2426%2C0)))%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EFor%20counting%20Floating%20Holidays%20Formula%26nbsp%3B%3DSUMPRODUCT(--ISNUMBER(MATCH(ROW(INDIRECT(DATEVALUE(%24I%242)%26amp%3B%22%3A%22%26amp%3BDATE(YEAR(DATEVALUE(AG29))%2CMONTH(DATEVALUE(AG29))%2C31)))%2C%24J%2430%3A%24J%2437%2C0)))%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EFor%20counting%20the%20overall%20then%20Formula%26nbsp%3B%3DSUMPRODUCT(--ISNUMBER(MATCH(ROW(INDIRECT(DATEVALUE(%24I%242)%26amp%3B%22%3A%22%26amp%3BDATE(YEAR(DATEVALUE(AG29))%2CMONTH(DATEVALUE(AG29))%2C31)))%2C%24B%243%3A%24B%2435%2C0)))%2BSUMPRODUCT(--ISNUMBER(MATCH(ROW(INDIRECT(DATEVALUE(%24I%242)%26amp%3B%22%3A%22%26amp%3BDATE(YEAR(DATEVALUE(AG29))%2CMONTH(DATEVALUE(AG29))%2C31)))%2C%24J%2412%3A%24J%2426%2C0)))%2BSUMPRODUCT(--ISNUMBER(MATCH(ROW(INDIRECT(DATEVALUE(%24I%242)%26amp%3B%22%3A%22%26amp%3BDATE(YEAR(DATEVALUE(AG29))%2CMONTH(DATEVALUE(AG29))%2C31)))%2C%24J%2430%3A%24J%2437%2C0)))%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHope%20it%20helps.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EBest%20regards%2C%3C%2FP%3E%3CP%3EJamil%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-276934%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-276934%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20Jose%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EYou%20were%20close%2C%20but%20your%20conditional%20formatting%20range%20area%20was%20different%20than%20what%20was%20used%20in%20the%20UDF.%20So%2C%20I%20modified%20the%20conditional%20formatting%20area%20range%20and%20used%20format%20painter%20to%20replicate%20it%20in%20other%20cells%20and%20it%20works%20now.%20I%20have%20attached%20the%20file%20here.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-275975%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-275975%22%20slang%3D%22en-US%22%3E%3CP%3EHello%20Jamil%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20having%20some%20issues%20when%20using%20the%20VBA%20codes%20you%20provided.%3C%2FP%3E%3CP%3EI%20have%20three%20types%20of%20cells%20I%20am%20looking%20to%20count.%26nbsp%3B%20All%20three%20have%20the%20same%20fill%20color%20(GREY)%20but%20different%20font%20colors(RED%2CPURPLE%2CBLUE).%26nbsp%3B%20Ultimately%20I%20would%20like%20to%20have%20a%20table%20that%20counts%20all%20similar%20fill%20colors%20(would%20include%20all%20three%20types).%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIt%20is%20difficult%20to%20explain%20the%20errors%20I'm%20getting%20so%20I%20included%20as%20much%20information%20in%20the%20attached%20excel%20as%20possible.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-270181%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-270181%22%20slang%3D%22en-US%22%3E%3CP%3EHello%2C%20Jamil%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EFirst%20I'd%20like%20to%20thank%20you%20for%20answering%20all%20those%20questions!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI've%20been%20trying%20to%20use%20the%20count%20formula%20in%20a%20worksheet%20but%20I%20always%20get%20the%20%23Value%20error.%20I%20read%20the%20whole%20thread%20and%20I%20couldn't%20figure%20out%20what%20I'm%20doing%20wrong.%20Could%20you%20please%20help%20me%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThis%20spreadsheet%20has%20grades%20of%20my%20students%20in%20three%20different%20periods%20and%20I%20wanna%20check%20how%20much%20green%20and%20purple%20boxes%20there%20are%20in%20each%20row.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20in%20advance%20for%20your%20attention%2C%3C%2FP%3E%3CP%3EJos%C3%A9%20Gabriel%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-269065%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-269065%22%20slang%3D%22en-US%22%3E%3CP%3EGot%20it.%20Thanks%20a%20lot%2C%20Jamil.%20Again%2C%20really%20appreciate%20all%20your%20help%20and%20quick%20responses.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-268587%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-268587%22%20slang%3D%22en-US%22%3EIt%20is%20because%20those%20formulas%20are%20not%20simple%20formulas%20and%20they%20are%20called%20Array%20formula%20which%20needs%20to%20be%20entered%20by%20holding%20Control%20%2B%20Shift%20then%2B%20Enter%3CBR%20%2F%3ESo%20if%20you%20simply%20enter%20it%20will%20give%20Value%20error%20but%20if%20you%20enter%20it%20with%20hold%20together%20control%20shift%20enter%20then%20it%20will%20work.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-268580%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-268580%22%20slang%3D%22en-US%22%3E%3CP%3EThanks%20a%20lot%20for%20the%20reply%2C%20Jamil.%20This%20is%20very%20helpful.%20Thank%20you%20for%20taking%20the%20time%20to%20help.%20A%20quick%20question%2C%20for%20some%20reason%2C%20when%20we%20double%20click%20or%20change%20the%20range%20in%20the%20helper%20column%20formula%2C%20it%20changes%20to%20%23value.%20I%20am%20not%20sure%20why.%20If%20you%20have%20any%20thoughts%2C%20please%20let%20me%20know.%20I%20really%20appreciate%20your%20support.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-268395%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-268395%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F224269%22%20target%3D%22_blank%22%3EAnand%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FA%3E%2C%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EI%20could%20not%20debug%20your%20file%2C%20aas%20you%20had%20several%20conditional%20formatting%20with%20deleted%20reference%20with%20%23REF%20error%20inside%20your%20CF%20formulas.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EHowever%2C%20i%20tried%20to%20come%20up%20with%20a%20solution%20using%20helper%20columns%20and%20built-in%20Excel%20functions.%26nbsp%3B%20I%20have%20attached%20the%20file.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-267880%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-267880%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20Jamil%2C%3C%2FP%3E%3CP%3EThanks%20for%20your%20patience%20and%20replying%20to%20queries%20posted%20around%20this%20subject.%20Appreciate%20it.%20I%20have%20been%20trying%20to%20apply%20the%20VBA%20function%20you%20had%20shared%20at%20the%20beginning%20of%20the%20thread.%20I%20have%20a%20slightly%20complicated%20conditional%20formatting%20set%20(cell%20to%20be%20highlighted%20yellow%20if%20there%20are%203%20consecutive%20zeros%2C%20red%20if%20there%20are%204%20or%20more%20consecutive%20zeros).%20I%20am%20not%20sure%20if%20it%20is%20due%20to%20complicated%20conditional%20formatting%2C%20but%20I%20get%20an%20error%20%23Name%3F%20as%20I%20try%20to%20count%20number%20of%20cells%20in%20red%20and%20yellow.%20When%20I%20rerun%2C%20sometimes%20I%20get%20a%20value%20but%20the%20number%20displayed%20is%20incorrect.%20Could%20you%20help%20resolve%20-%20thanks%20a%20lot.%20I%20have%20attached%20the%20excel.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-263555%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-263555%22%20slang%3D%22en-US%22%3EYou%20are%20welcome%20Shane.%20Thanks%20for%20the%20feedback.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-263511%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-263511%22%20slang%3D%22en-US%22%3E%3CP%3EWow%2C%20I%20was%20WAY%20overthinking%20this%20problem...You're%20reply%20was%20very%20very%20quick%2C%20thank%20you.%3CBR%20%2F%3E%3CBR%20%2F%3EI%20was%20looking%20on%20page%202%20and%20found%20another%20solution%20you%20gave%20%22%3DSUMPRODUCT(--(ISNUMBER(SEARCH(%22Car%22%2C%24C%3AC)))%2C%24D%3AD)%22%26nbsp%3B%20But%20the%20sumif%20is%20way%20less%20complicated.%26nbsp%3B%20Thank%20you!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-263509%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-263509%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F216084%22%20target%3D%22_blank%22%3EShane%3C%2FA%3E.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3Eyou%20can%20simply%20do%20that%20with%20SUMIF%20function.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EI%20have%20embedded%20the%20formula%20into%20the%20attached%20workbook.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-263505%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-263505%22%20slang%3D%22en-US%22%3E%3CP%3EHello%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20a%20list%20of%20expenses%20that%20are%20separated%20into%20categories.%26nbsp%3B%20When%20you%20select%20a%20category%20from%20the%20dropdown%2C%20it%20changes%20background%20color%20for%20the%20expense%20amount.%26nbsp%3B%20I%20am%20trying%20to%20add%20all%20these%20up%20automatically%20at%20the%20bottom.%26nbsp%3B%20I%20have%20attached%20a%20sample.%3CBR%20%2F%3E%3CBR%20%2F%3EAny%20ideas%20if%20there%20is%20a%20easier%20solution%2C%20or%20what%20I%20should%20do%3F%3CBR%20%2F%3E%3CBR%20%2F%3EI%20tried%20your%20second%20code%20you%20posted%20on%20this%20thread%2C%20when%20I%20try%20to%20add%20the%20%22car%22%20category%2C%20it%20returns%20with%20a%20straight%20%24100.%26nbsp%3B%20Dosnt%20add%20anything.%26nbsp%3B%20Any%20help%20would%20be%20great.%26nbsp%3B%20Thank%20you%20very%20much!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-258503%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-258503%22%20slang%3D%22en-US%22%3E%3CP%3EThanks%20for%20the%20feedback%20Matt.%26nbsp%3B%20Glad%20to%20hear%20you%20figured%20it%20out%20by%20yourself.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-258131%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-258131%22%20slang%3D%22en-US%22%3E%3CP%3EThank%20you%2C%20I%20looked%20at%20this%20further%20and%20realized%26nbsp%3Bmy%20conditional%20formulas%20overlapped%20but%20their%20organization%20was%20allowing%20the%26nbsp%3Bformatting%20to%20be%20correct.%26nbsp%3B%20I%20am%20able%20to%20change%20the%20formulas%20and%20get%20the%20correct%20results.%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-255655%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-255655%22%20slang%3D%22en-US%22%3EMatt%2C%20%3CBR%20%2F%3E%3CBR%20%2F%3Eit%20would%20work%20with%20any%20number%20of%20colors%2C%20as%20long%20as%20the%20UDF%20parameter%20color%20input%20and%20CF%20are%20having%20the%20same%20color.%20if%20your%20file%20does%20not%20produce%20correct%20result%2C%20can%20you%20attach%20a%20sample%20file%20so%20that%20i%20can%20take%20a%20look%3F%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-255365%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-255365%22%20slang%3D%22en-US%22%3E%3CP%3EJamil%20-%26nbsp%3B%20This%20is%20a%20great%20tool%2C%20however%2C%20is%20it%20possible%20to%20make%20it%20work%20for%203%20colors%3F%26nbsp%3B%20The%20counts%20and%20sums%26nbsp%3Bare%20inaccurate%20for%20me%20after%20the%20first%20color%20when%20there%20are%20more%20than%202.%26nbsp%3B%20Thank%20you!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-250783%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-250783%22%20slang%3D%22en-US%22%3E%3CP%3EThis%20is%20awesome%2C%20thank%20you%20so%20much%20for%20your%20help!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-244455%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-244455%22%20slang%3D%22en-US%22%3E%3CP%3EDear%20David%2C%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20issue%20with%20your%20file%20was%2C%20that%20UDF%20was%20using%20single%20row%20range%20as%20the%20range%20input%2C%20while%20the%20Conditional%20Formatting%20was%20applies%20from%20L2%20to%20Z8%20.%26nbsp%3B%20%26nbsp%3BSo%2C%20i%20modified%20the%20file%20Conditional%20Formatting%20and%20now%20it%20works.%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAlso%20inside%20the%20CF%20formula%2C%20you%20used%20two%20functions%2C%20while%20this%20was%20not%20cause%20of%20error%2C%20but%20to%20make%20it%20simple%20and%20faster%2C%20i%20simplified%20it%20with%20a%20single%20function%20of%20%22Columns%22.%3C%2FP%3E%0A%3CP%3E%26nbsp%3Bso%26nbsp%3B%3DCOLUMN(L2)-COLUMN(%24L2)%2B1%26gt%3B%3D%24AE2%26nbsp%3B%20became%26nbsp%3B%3DCOLUMNS(%24L2%3AL2)%26gt%3B%3D%24AE2%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EPlease%20download%20and%20see%20attached%20workbook.%26nbsp%3B%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-242749%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-242749%22%20slang%3D%22en-US%22%3E%3CP%3EDear%20Jamil%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EYour%20help%20has%20been%20really%20enlightening.%20If%20you%20are%20available%2C%20could%20you%20please%20help%20me%20by%20taking%20a%20look%20at%20his%20file%3F%3C%2FP%3E%3CP%3EI%20am%20using%20the%20VB%20code%20you%20created%2C%20but%20the%20formula%20doesn't%20seem%20to%20recognize%20the%20CF%20color%20and%20I%20keep%20getting%20the%20%23VALUE!%20refference.%3C%2FP%3E%3CP%3ECould%20you%20let%20me%20know%20how%20to%20fix%20this%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-240620%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-240620%22%20slang%3D%22en-US%22%3E%3CP%3EThank%20you%20Jamil-%20so%20easy%20when%20you%20know%20how.%26nbsp%3B%20Much%20appreciated.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-239857%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-239857%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3BNoel%2C%3C%2FP%3E%0A%3CP%3EThe%20VALUE%20error%20because%20your%20conditional%20formatting%20was%20not%20set%20using%20formula.%3C%2FP%3E%0A%3CP%3EIf%20you%20read%20my%20earlier%20post%2C%20I%20have%20highlighted%20that%20UDF%20only%20works%20if%20the%20conditional%20formatting%20is%20set%20by%20using%20formula%20and%20not%20the%20built-in%20features%20of%20CF.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ESo%2C%20in%20the%20attached%20workbook%2C%20I%20have%20set%20the%20Conditional%20Formatting%20using%20formula%20and%20then%20the%20UDF%20works.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3Eplease%20note%20that%20SUBTOTALs%20are%20not%20counted%20as%20duplicate.%26nbsp%3B%20%26nbsp%3Bplease%20see%20attached%20file%20and%20examine%20it%20by%20yourself.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EHope%20it%20helps.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-239855%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-239855%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3BHyosun%20Ko%2C%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3Ethe%20reason%20it%20did%20not%20work%20is%2C%20because%20you%20used%20ranges%20outside%20the%20scope%26nbsp%3Brange%20and%26nbsp%3Bworksheet%20in%20the%20formula%20that%20set%20conditional%20formatting.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EUDF%20is%20not%20designed%20to%20handle%20such%20complicated%20formulas%20outside%20the%20scope%20of%20CF.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3Ehowever%2C%20the%20good%20news%20is%20that%20you%20do%20not%20have%20to%20use%20the%20UDF%20to%20ge%20tthe%20result%20which%20you%20need.%26nbsp%3B%20you%20can%20use%20the%20built-in%20SUMPRODUCT%20function%20to%20get%20the%20sum%20based%20on%20your%20conditions%20exactly%20like%20the%20CF.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3Eso%20for%20sum%20of%20Cabinet%20use%26nbsp%3B%3DSUMPRODUCT(G%2411%3AG%2420%2C--(G%2411%3AG%2420%26gt%3B0)%2C--ISNUMBER(MATCH(%24B%2411%3A%24B%2420%2CCabinet_recharge%2C0)))%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3Eand%20for%20base%26nbsp%3B%3DSUMPRODUCT(H%2411%3AH%2420%2C--(H%2411%3AH%2420%26gt%3B0)%2C--ISNUMBER(MATCH(%24B%2411%3A%24B%2420%2CBase_recharge%2C0)))%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3Efor%20colour%26nbsp%3B%3DSUMPRODUCT(J%2411%3AJ%2420%2C--(J%2411%3AJ%2420%26gt%3B0)%2C--ISNUMBER(MATCH(%24B%2411%3A%24B%2420%2CColour_recharge%2C0)))%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3Efor%20installation%26nbsp%3B%3DSUMPRODUCT(K%2411%3AK%2420%2C--(K%2411%3AK%2420%26gt%3B0)%2C--ISNUMBER(MATCH(%24B%2411%3A%24B%2420%2CInstallation_recharge%2C0)))%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3Efor%20delivery%26nbsp%3B%3DSUMPRODUCT(L%2411%3AL%2420%2C--(L%2411%3AL%2420%26gt%3B0)%2C--ISNUMBER(MATCH(%24B%2411%3A%24B%2420%2CDelivery_recharge%2C0)))%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EI%20have%20embedded%20these%20formulas%20in%20the%20attached%20workbook.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-236598%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-236598%22%20slang%3D%22en-US%22%3E%3CP%3EJamil%20I%20have%20the%20same%20issue%20as%20Hyosun.%26nbsp%3B%20I've%20entered%20the%20VBA%20code%20but%20cannot%20get%20it%20to%20work.%26nbsp%3B%20No%20matter%20what%20I%20do%20it%20keeps%20showing%20the%20%23Value.%26nbsp%3B%20I'm%20trying%20to%20count%20duplicate%20text%20based%20values%20which%20seems%20to%20be%20causing%20some%20problems.%20Can%20you%20point%20me%20towards%20where%20the%20error%20might%20be%20occurring%20and%20or%20a%20resolution.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ENoel%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-236592%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-236592%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20Jamil%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you%20for%20sharing%20your%20VBA%20code.%3C%2FP%3E%3CP%3EI%20have%20copied%20your%20code%20in%20my%20excel%20file%2C%20but%20I%20got%26nbsp%3B%23VALUE!%20errors.%3C%2FP%3E%3CP%3ECould%20you%20check%20what's%20wrong%20with%20the%20file%3F%3C%2FP%3E%3CP%3EThank%20you%20for%20your%20help%20in%20advance.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-224378%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-224378%22%20slang%3D%22en-US%22%3EYou%20are%20welcome%20Steve.%3CBR%20%2F%3E%3CBR%20%2F%3EThanks%20for%20the%20feedback.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-224368%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-224368%22%20slang%3D%22en-US%22%3E%3CP%3EJamil%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20made%20this%20adjustment%20after%20adding%20more%20sheets%20and%20all%20is%20working%20just%20as%20it%20should.%26nbsp%3B%20Thank%20you%20so%20much%20for%20all%20your%20help%20on%20this%20issue!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-223527%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-223527%22%20slang%3D%22en-US%22%3EThanks%20for%20the%20feedback%20Steve.%3CBR%20%2F%3E%3CBR%20%2F%3EI%20didn%E2%80%99t%20change%20anything%20in%20the%20sheets.%3CBR%20%2F%3E%3CBR%20%2F%3EExcept%20that%20I%20removed%20one%20line%20from%20the%20beginning%20of%20the%20code%20which%20was%20%3CBR%20%2F%3EApplication.Volatile%20%3CBR%20%2F%3E%3CBR%20%2F%3EThat%E2%80%99s%20it.%3CBR%20%2F%3E%3CBR%20%2F%3EIf%20you%20add%20more%20worksheets%20there%20should%20not%20be%20any%20issue.%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-223495%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-223495%22%20slang%3D%22en-US%22%3E%3CP%3EJamil%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EPlease%20disregard%20my%20previous%20message.%26nbsp%3B%20After%20I%20enabled%20Macros%2C%20saved%2C%20and%20closed%20the%20document%2C%20I%20opened%20it%20back%20up%20and%20it%20was%20running%20the%20formulas%20properly.%26nbsp%3B%20However%2C%20I%20did%20have%20to%20double%20click%20the%20cell%20and%20press%20Enter%20to%20refresh%20the%20formula%20so%20that%20it%20would%20calculate%20the%20correct%20amount.%26nbsp%3B%20Regardless%2C%20the%20numbers%20work%20and%20they%20do%20not%20change%20when%20I%20do%20this%20to%20other%20output%20cells%20on%20separate%20sheets.%26nbsp%3B%20I%20will%20need%20to%20add%20what%20you%20did%20on%20these%204%20sheets%20to%20several%20other%20sheets%20to%20get%20them%20to%20work%20properly%20as%20well.%26nbsp%3B%20Could%20you%20let%20me%20know%20what%20you%20changed%20so%20that%20I%20can%20make%20the%20same%20edit%20to%20the%20full%20workbook%20and%20its%20additional%20sheets%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-223492%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-223492%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20Jamil%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20running%20into%20an%20invalid%20name%20error%20with%20each%20COUNTConditionColorCells%20output%20cell%20stating%20that%20the%20formulas%20contain%20unrecognized%20text.%26nbsp%3B%20I%20did%20enable%20macros%20on%20the%20sheet%20after%20downloading%20it.%26nbsp%3B%20However%2C%20I%20can%20see%20from%20the%20document%20preview%20that%20the%20first%202%20sheets%20are%20calculating%20correctly%20for%20both%20green%20and%20red%20text%20cells%2C%20while%20the%203rd%20and%204th%20sheets%20are%20calculating%20green%20text%20cells%20properly%20but%20not%20the%20red%20text%20cells%20(sheet%203%20shows%206%20while%20it%20should%20be%209%2C%20sheet%204%20shows%2010%20while%20it%20should%20be%207).%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-222692%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-222692%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20Steve%2C%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3Ethanks%20for%20uploading%20the%20sample%20data.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ECan%20you%20please%20test%20the%20attached%20version%3F%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-222407%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-222407%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20Jamil%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWhen%20I%20refresh%20using%20F9%2C%20the%20current%20sheet%20will%20show%20the%20correct%20data%20in%20the%20output%20cell%2C%20however%20this%20appears%20to%20interfere%20with%20the%20output%20cells%20on%20other%20sheets%20in%20the%20workbook%20which%20are%20trying%20to%20sum%20the%20color%20condition%20using%20a%20range%20of%20cells%20on%20their%20respective%20worksheet.%26nbsp%3B%20I%20have%20attached%20a%20sample%20of%20the%20workbook%20I'm%20working%20on%20to%20hopefully%20better%20illustrate%20the%20situation.%26nbsp%3B%20Perhaps%20this%20is%20an%20issue%20with%20my%20conditional%20formatting%20formulas%2C%20however%20each%20sheet%20is%20calculating%20the%20correct%20number%20of%20colored%20cells%20on%20its%20own%2C%20leading%20me%20to%20believe%20that%20this%20is%20not%20the%20case.%26nbsp%3B%20Could%20you%20take%20a%20look%20and%20suggest%20what%20I%20might%20do%20to%20fix%20this%3F%26nbsp%3B%20If%20it%20requires%20a%20UDF%20for%20each%20sheet%20individually%2C%20could%20you%20help%20me%20with%20a%20rewrite%20to%20make%20the%20code%20sheet%20specific%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you%20very%20much%20for%20your%20time!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-219733%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-219733%22%20slang%3D%22en-US%22%3EHi%20Steve%2C%3CBR%20%2F%3E%3CBR%20%2F%3EI%20am%20not%20sure%20if%20I%20understood%20your%20question.%20%3CBR%20%2F%3E%3CBR%20%2F%3EThe%20UDF%20calculation%20method%20works%20exactly%20as%20the%20whole%20workbook%20calculation%20like%20F9%20key.%3CBR%20%2F%3Emeaning%20if%20the%20calculation%20is%20triggered%2C%20it%20will%20effect%20all%20sheets%2C%20and%20not%20only%20a%20specific%20sheet.%3CBR%20%2F%3Eso%2C%20if%20you%20want%20the%20UDF%20to%20only%20calculate%20on%20specific%20sheet%2C%20then%20the%20code%20needs%20to%20be%20modified%20to%20work%20on%20the%20worksheet%20level.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-219731%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-219731%22%20slang%3D%22en-US%22%3EYes.%20please%20see%20my%20example%20here%3CBR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2FExcel%2Fsum-by-color-when-colors-are-set-by-conditional-formatting%2Fm-p%2F174923%2Fhighlight%2Ftrue%23M8275%22%20target%3D%22_blank%22%3Ehttps%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2FExcel%2Fsum-by-color-when-colors-are-set-by-conditional-formatting%2Fm-p%2F174923%2Fhighlight%2Ftrue%23M8275%3C%2FA%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-219730%22%20slang%3D%22en-US%22%3ERe%3A%20Sum%20by%20color%20with%20multiple%20criteria's.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-219730%22%20slang%3D%22en-US%22%3E%3CBLOCKQUOTE%3E%3CHR%20%2F%3E%3C%2FBLOCKQUOTE%3E%0A%3CBLOCKQUOTE%3Eyou%20did%20not%20attach%20anything%2C%20besides%20your%20question%20is%20not%20relevant%20to%20this%20thread.%20try%20posting%20a%20new%20question%2C%26nbsp%3B%3CP%20class%3D%221532740140316%22%3E%26nbsp%3B%3C%2FP%3E%0A%3C%2FBLOCKQUOTE%3E%0A%3CBLOCKQUOTE%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F159916%22%20target%3D%22_blank%22%3E%40null%20null%3C%2FA%3E%26nbsp%3Bwrote%3A%3CBR%20%2F%3E%3CP%3EHi%20jamil%2C%3C%2FP%3E%0A%3CP%3EI'm%20little%20lost%20%26amp%3B%20confused%20and%20trying%20to%20make%20my%20code%20bit%20short.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIn%20multiple%20if%2C%20Elseifs%20statements%20in%20VBA%2C%20I%20need%20to%20use%20array%2C%20But%20not%20able%20to%20debug%20it.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EExcel%20version%20of%20same%20is%20attached%2C%20Can%20you%20help%20me%20with%20vba%20code..%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20504px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F36872i76B9D5F636E6081B%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22Capture.PNG%22%20title%3D%22Capture.PNG%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CHR%20%2F%3E%3C%2FBLOCKQUOTE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-216943%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-216943%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20Jamil%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20been%20able%20to%20get%20the%20UDF%20to%20function%20successfully.%26nbsp%3B%20However%2C%20when%20I%20refresh%20the%20data%20on%20a%20different%20sheet%20to%20update%20that%20sheet's%20count%20of%20colored%20cells%2C%20the%20sums%20change%20on%20the%20previous%20sheet%20and%2For%20any%20other%20sheet%20which%20has%20summed%20the%20cells%20with%20conditional%20formatting.%26nbsp%3B%20The%20cells%20within%20the%20sheet%20that%20I%20refresh%20on%20sum%20correctly%2C%20so%20my%20conditional%20formatting%20should%20be%20accurate.%26nbsp%3B%20Do%20I%20need%20to%20establish%20the%20UDF%20to%20each%20sheet%20in%20the%20workbook%20specifically%2C%20or%20is%20there%20another%20way%20to%20ensure%20that%20the%20sums%20calculated%20on%20one%20sheet%20do%20not%20change%20when%20a%20refresh%20has%20been%20run%20on%20another%20sheet%3F%26nbsp%3B%20Would%20there%20be%20anything%20else%20I%20would%20need%20to%20check%20as%20to%20why%20this%20is%20happening%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you%20for%20your%20help!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-214556%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-214556%22%20slang%3D%22en-US%22%3E%3CP%3Ehi%2C%20tnx%20for%20your%20file.%20is%20it%20possible%20to%20count%20color%20of%20conditional%20formatting%20cells%20in%20excel%20with%20vba%20only%20for%20those%20cells%20which%20are%20only%20numberic%3F%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-212887%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-212887%22%20slang%3D%22en-US%22%3EHi%20Jamil%2C%3CBR%20%2F%3E%3CBR%20%2F%3ELate%20reply%20but%20the%20colors%20were%20indeed%20the%20issue%20for%20the%20Test%20Sheet.%20For%20my%20actual%20data%20the%20UDF%20doesn't%20work%2C%20even%20with%20standard%20colors.%20I%20think%20it%20has%20something%20to%20do%20with%20the%20ConvertFormula%20function%20in%20the%20UDF.%20My%20Conditional%20Formatting%20uses%20INDIRECT%20to%20determine%20the%20cell%20reference%20and%20not%20a%20direct%20cell%20reference%20type.%3CBR%20%2F%3E%3CBR%20%2F%3ECan%20this%20be%20an%20issue%3F%20And%20can%20this%20be%20reworked%3F%20Workbook%20hasn't%20changed.%3CBR%20%2F%3E%3CBR%20%2F%3ECheers%2C%20Mario%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-210690%22%20slang%3D%22en-US%22%3ERe%3A%20Sum%20by%20color%20with%20multiple%20criteria's.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-210690%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20jamil%2C%3C%2FP%3E%3CP%3EI'm%20little%20lost%20%26amp%3B%20confused%20and%20trying%20to%20make%20my%20code%20bit%20short.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIn%20multiple%20if%2C%20Elseifs%20statements%20in%20VBA%2C%20I%20need%20to%20use%20array%2C%20But%20not%20able%20to%20debug%20it.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EExcel%20version%20of%20same%20is%20attached%2C%20Can%20you%20help%20me%20with%20vba%20code..%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20504px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F36872i76B9D5F636E6081B%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22Capture.PNG%22%20title%3D%22Capture.PNG%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-210278%22%20slang%3D%22en-US%22%3ERe%3A%20Sum%20by%20color%20with%20multiple%20criteria's.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-210278%22%20slang%3D%22en-US%22%3EYou%20are%20welcome.%20glad%20it%20worked%20for%20you.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-210203%22%20slang%3D%22en-US%22%3ERe%3A%20Sum%20by%20color%20with%20multiple%20criteria's.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-210203%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20Jamil%2C%3C%2FP%3E%3CP%3EYour%20suggestion%20worked%20perfectly..%20Thanks%20at%20lot..%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-209394%22%20slang%3D%22en-US%22%3ERe%3A%20Sum%20by%20color%20with%20multiple%20criteria's.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-209394%22%20slang%3D%22en-US%22%3EHi%20Jamil%2C%3CBR%20%2F%3E%3CBR%20%2F%3EActual%20what%20you%20are%20same%20is%20Correct%2C%20I'm%20already%20running%20VBA%20code%20in%2010%20parts%20to%20save%20CPU%20Memory.%3CBR%20%2F%3EThe%20second%20logic%20with%20example%20makes%20some%20sense%2C%20I%20will%20try%20the%20same%20in%20greater%20depth%20of%20details.%3CBR%20%2F%3EI%20will%20let%20you%20know%20the%20result.%20Thanks%20in%20Advance.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-209374%22%20slang%3D%22en-US%22%3ERe%3A%20Sum%20by%20color%20with%20multiple%20criteria's.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-209374%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20null%20null%2C%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3Ewhat%20you%20are%20trying%20to%20achieve%20can%20be%20done%20with%20a%20very%20complicated%20UDF%20but%26nbsp%3Bwill%20be%20very%20CPU%20hungry.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIf%20your%20colors%20marks%20are%20based%20on%20some%20hardcorded%20condition%20which%20is%20not%20from%20conditional%20formatting%2C%20then%20use%20those%20conditions%20inside%20the%20SUMIFs%20or%20SUMPRODUCT%20and%20if%20your%20colors%20are%20based%20on%20conditional%20formatting%20rules%2C%20then%20use%20those%20rules%20you%20used%20in%20the%20conditional%20formatting%20inside%20the%20SUMIFs%20or%20SUMPRODUCT%20formula.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3Efor%20example%2C%20from%20your%20previous%20file%2C%20you%20have%20condition%20of%26nbsp%3B%20if%20cell%20values%20is%20between%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3D0.2791%20and%26nbsp%3B%3D0.3062%20then%20it%20is%20red.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3Eso%20you%20can%20use%20the%20same%20logic%20inside%20the%20formula%20for%20example%20like%20this%26nbsp%3B%3D-SUMIFS(E3%3AK35%2CE3%3AK35%2C%22%26gt%3B%3D0.2791%22%2CE3%3AK35%2C%22%26lt%3B%3D0.3062%22)%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-209352%22%20slang%3D%22en-US%22%3ERe%3A%20Sum%20by%20color%20with%20multiple%20criteria's.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-209352%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20Jamil%2C%3C%2FP%3E%3CP%3EThe%20said%20UDF%20is%20not%20suitable%20to%20my%20problem%20as%20it%20cannot%20sum%2Fcount%20with%20multiple%20criteria.%3C%2FP%3E%3CP%3EFurther%20i%20have%20checked%20multiple%20forums%20for%20sumif%20by%20Cell%20Color%20but%20non%20are%20matching%20my%20problem.%3C%2FP%3E%3CP%3EExtended%20version%20of%20sample%20result%20required%20is%20attached.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F36746i909AE80E9F3EB829%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22Capture1.PNG%22%20title%3D%22Capture1.PNG%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-209285%22%20slang%3D%22en-US%22%3ERe%3A%20Sum%20by%20color%20with%20multiple%20criteria's.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-209285%22%20slang%3D%22en-US%22%3E%3CP%3EIf%20you%20are%20looking%20for%20UDF%20to%20sum%20based%20on%20index%20color%20and%20not%20conditional%20formatted%20color.%20then%20it%20is%20even%20simpler.%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3Eyou%20can%20take%20the%20UDF%20from%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fwww.extendoffice.com%2Fdocuments%2Fexcel%2F1155-excel-count-sum-cells-by-color.html%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Elink%20here%3C%2FA%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-209252%22%20slang%3D%22en-US%22%3ERe%3A%20Sum%20by%20color%20with%20multiple%20criteria's.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-209252%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20Jamil%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20had%20read%20the%20all%20the%20thread%20post%2C%20But%20the%20problem%20is%20my%20worksheet%20is%20too%20large%20to%20apply%20conditional%20formatting%20and%20excel%20crashes%20upon%20conditional%20formatting.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EFurther%2C%20Color%20coding%20as%20seen%20in%20each%20cell%20is%20coming%20from%20series%20of%20various%20conditions%20in%20other%20spreadsheet.%20(i.e%20For%20each%20cell%20in%20Qty%2C%20There%20are%204-5%20activities%20to%20be%20completed%20each%20activity%20having%20unique%20color%2C%20If%20particular%20activity%20is%20completed%2C%20It%20will%20return%20only%20%22ColorIndex%22%20in%20current%20sheet)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHence%2C%20I%20need%20to%20sum%20the%20fields%20using%20%22ColorIndex%22%20and%20other%20criteria's.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-209238%22%20slang%3D%22en-US%22%3ERe%3A%20Sum%20by%20color%20with%20multiple%20criteria's.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-209238%22%20slang%3D%22en-US%22%3Enull%20null%2C%3CBR%20%2F%3E%3CBR%20%2F%3Eit%20does%20not%20work%20because%20you%20perhaps%20did%20not%20read%20the%20rule%20on%20how%20to%20use%20this%20UDF.%20please%20see%20my%20post%20here%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2FMacros-and-VBA%2Fsum-by-color-when-colors-are-set-by-conditional-formatting%2Fm-p%2F40312%2Fhighlight%2Ftrue%23M28%22%20target%3D%22_blank%22%3Ehttps%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2FMacros-and-VBA%2Fsum-by-color-when-colors-are-set-by-conditional-formatting%2Fm-p%2F40312%2Fhighlight%2Ftrue%23M28%3C%2FA%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%22%22UDF%20will%20only%20work%2C%20if%20your%20rules%20of%20conditional%20formatting%20is%20created%20using%20conditional%20formatting%20rules%20with%20formula%20aka%20(use%20a%20formula%20to%20determine%20which%20cells%20to%20format)%20%22%22%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-209191%22%20slang%3D%22en-US%22%3ERe%3A%20Sum%20by%20color%20with%20multiple%20criteria's.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-209191%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20Jamil%2C%3CBR%20%2F%3E%3CBR%20%2F%3EI%20have%20a%20large%20database%20(In%20excess%20of%20200Columns%20%26amp%3B%208000Rows)%20which%20needs%20to%20be%20sorted%20out%20by%20cell%20color%20and%20other%20multiple%20criteria.%20I%20have%20tried%20out%20multiple%20things%20but%20failed.%3CBR%20%2F%3E%3CBR%20%2F%3EI'm%20basically%20looking%20for%20type%20of%20SUMIFS%20function%20with%20ColorIndex%20as%20Criteria.%3CBR%20%2F%3E%3CBR%20%2F%3EA%20snap%20shot%20is%20attached.%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F36724iB591FF1C2740174D%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22Capture.PNG%22%20title%3D%22Capture.PNG%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-207681%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-207681%22%20slang%3D%22en-US%22%3EYou%20are%20welcome%20Zareba.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-207622%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-207622%22%20slang%3D%22en-US%22%3E%3CP%3ETHX%20Jamil%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-207600%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-207600%22%20slang%3D%22en-US%22%3EHi%20Zereba%2C%3CBR%20%2F%3E%3CBR%20%2F%3Esorry%2C%20I%20do%20not%20have%20time%20inspect%20and%20add%20multiple%20condition%20formula%20in%20your%20gantt%20chart%20template.%20As%20you%20can%20see%20in%20your%20worksheet%20Arkusz1%20the%20UDF%20works.%20So%2C%20making%20it%20work%20on%20the%20gantt%20chart%20is%20a%20matter%20of%20putting%20effort%20and%20time.%20And%20again%2C%20what%20you%20are%20trying%20to%20achieve%2C%20can%20be%20done%20with%20Excel%20built-in%20Formula%20similar%20to%20the%20post%20204391%20link%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2FMacros-and-VBA%2Fsum-by-color-when-colors-are-set-by-conditional-formatting%2Fm-p%2F204391%2Fhighlight%2Ftrue%23M996%22%20target%3D%22_blank%22%3Ehttps%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2FMacros-and-VBA%2Fsum-by-color-when-colors-are-set-by-conditional-formatting%2Fm-p%2F204391%2Fhighlight%2Ftrue%23M996%3C%2FA%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-207598%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-207598%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3CSPAN%3EMario%2C%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%3Ethe%20colors%20you%20selected%20for%20background%20are%20not%20the%20standard%20colors%2C%20so%20if%20you%20select%20from%20one%20of%20the%20standard%20colors%2C%20for%20example.%26nbsp%3B%20change%20the%20background%20color%20of%20Past%20due%20to%20red.%20then%20the%20UDF%20will%20result%20correct%20output.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%3Eplz%20see%20attached.%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-207394%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-207394%22%20slang%3D%22en-US%22%3E%3CP%3EHello%2C%20Jamil%3C%2FP%3E%3CP%3EI%20have%20read%20the%20whole%20topic%20on%20the%20SumConditionColorCells%20forum%20and%20have%20not%20found%20the%20answer%20to%20my%20problem.%3C%2FP%3E%3CP%3EThe%20file%20that%20I%20sent%20to%20you%20in%20the%20appendix%20contains%20conditional%20formatting.%20In%20places%20where%20there%20is%20formatting%20I%20want%20to%20put%20the%20number%20of%20employees%20needed%20to%20perform%20the%20task.%3C%2FP%3E%3CP%3EIn%20the%20upper%20lines%2C%20add%20the%20number%20of%20employees%20needed%20on%20a%20given%20day.%20Unfortunately%2C%20the%20SumConditionColorCells%20function%20does%20not%20work%20for%20me%20in%20this%20range.%3C%2FP%3E%3CP%3EPlease%2C%20if%20you%20have%20an%20idea%20how%20to%20solve%20it%20for%20help.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-207264%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-207264%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20Jamil%2C%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20created%20a%20test%20worksheet%20(highlighted%20yellow)%20in%20my%20workbook%20to%20test%20the%20UDF%20and%20it%20works%2C%20however%20it%20counts%20one%20too%20high%20for%20one%20condition.%20Could%20you%20look%20at%20this%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAlso%20it%20appears%20that%20the%20UDF%20cannot%20handle%20my%20Conditional%20Formatting%20formula%20that%20I%20want%20to%20check.%20It%20uses%20the%20INDIRECT%20function%20to%20determine%20the%20cell%20that%20needs%20to%20be%20checked%20instead%20of%20a%20direct%20reference.%20I%20highlighted%20this%20worksheet%20green%20and%20put%20the%20color%20codes%20in%20the%20reference%20formatted%20cells.%20I%20don't%20think%20I%20can%20find%20a%20way%20to%20create%20a%20less%20complicated%20Conditional%20Formatting%20formula.%20If%20I%20want%20to%20rework%20the%20formula%20I%20need%20to%20move%20a%20lot%20of%20data%20and%20clutter%20the%20worksheets%20which%20I%20would%20like%20to%20avoid.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECould%20the%20UDF%20be%20modified%20to%20recognize%20INDIRECT%20functions%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EYour%20dedication%20to%20this%20subject%20is%20outstanding%20btw%20%3CLI-EMOJI%20id%3D%22lia_slightly-smiling-face%22%20title%3D%22%3Aslightly_smiling_face%3A%22%3E%3C%2FLI-EMOJI%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EMario%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-204971%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-204971%22%20slang%3D%22en-US%22%3E%3CP%3EF%20M%3C%2FP%3E%0A%3CP%3EIf%20you%20examine%20in%20detail%2C%20your%20workbook%20conditional%20formatting%20has%20one%20rule%20and%20it%20is%20applied%20in%20the%20whole%20range%20of%20%24A%243%3A%24G%2416%20and%20when%20you%20use%20the%20UDF%20to%20count%20per%20each%20row%20then%20you%20are%20giving%20the%20UDF%20a%20range%20of%20single%20row%20%24A3%3A%24G3%20while%20your%20conditional%20formatting%20range%20is%20%24A%243%3A%24G%2416.%20Therefore%2C%20the%20mismatch%20between%20range%20of%20conditional%20formatting%20and%20the%20input%20range%20in%20the%20UDF.%20If%20you%20to%20make%20it%20work%20for%20per%20row%2C%20then%20you%20need%20to%20delete%20edit%20the%20conditional%20formatting%20and%20apply%20range%20should%20be%20the%20%24A3%3A%24G3%20and%20then%20select%20%24A3%3A%24G3%20and%20click%20the%20%22Format%20Painter%22%20and%20then%20select%20the%20each%20row%20separately%20to%20add%20the%20per%20row%20conditional%20formatting.%20Then%20your%20UDF%20per%20row%20will%20work.%20%3CBR%20%2F%3EBesides%2C%20you%20have%20locked%20the%20range%20to%20absolute%20reference%20in%20the%20UDF%2C%20so%20all%20of%20the%20rows%20refer%20to%20the%20row%203%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EPlz%20see%20attached%20workbook%20also%20with%20a%20quick%20video%20that%20I%20have%20recorded%20and%20uploaded%20here%2C%20You%20can%20watch%20the%20video%20to%20learn%20how%20you%20can%20fix%20the%20problem%20in%20your%20workbook.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-204967%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-204967%22%20slang%3D%22en-US%22%3EHi%20Evelina%2C%3CBR%20%2F%3E%3CBR%20%2F%3Ein%20your%20workbook%2C%20you%20have%20set%20the%20conditional%20formatting%20range%20differently%20than%20the%20range%20C5%3AAX5%20you%20are%20using%20in%20the%20UD.%20Also%20your%20conditional%20formatting%20in%20column%20C%20is%20just%20for%20column%20C%20and%20then%20from%20D%20to%20the%20left%20is%20%24D%246%3A%24AX%246%20and%20this%20range%20from%20column%20D%20to%20AX%20have%20not%20used%20formula%20to%20set%20up%20condition%20formatting.%20it%20has%20used%20the%20built%20in%20function%20of%20%22Format%20only%20cells%20that%20contain%22%20UDF%20only%20works%20if%20the%20conditional%20formatting%20rule%20is%20set%20using%20formula%20option.%20From%20what%20I%20see%20in%20your%20table%2C%20you%20could%20easily%20get%20the%20same%20result%20using%20built-in%20formula%20of%20SUMPRODUCT%20or%20SUMIFS.%20Again%2C%20your%20row%203%20has%20n%20o%20data%2C%20so%20I%20would%20not%20know%20what%20would%20be%20the%20criteria%20for%20the%20formula.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-204718%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-204718%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%20I%20am%20trying%20to%20get%20a%20count%20of%20each%20row%20in%20your%20attached%20example%2C%20but%20when%20I%20am%20passing%20the%20row%20information%2C%20it%20only%20works%20correctly%20for%20the%20first%20row%20and%20then%20the%20others%20give%20the%20same%20result.%20Any%20way%20to%20get%20this%20done%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-204458%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-204458%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20Jamil%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI'm%20trying%20to%20count%26nbsp%3Bhow%20many%20cells%20that%20are%20green%20marked%20but%20only%20gets%200%20as%20the%20answer%20even%20though%20it%20should%20be%20one.%20What%20am%20I%20doing%20wrong%3F%20I'm%20using%20the%20vba%20for%20counting%20that%20you%20attached%20earlier%20in%20the%20thread%20and%20also%20conditional%20formatting.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-204391%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-204391%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20Carl%2C%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ELooking%20at%20your%20workbook%2C%20there%20is%20a%20mismatch%20between%20(applied%20range%20to)%20in%20the%20conditional%20formatting%20and%20the%20UDF.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIf%20you%20look%20at%20your%20conditional%20formatting%20rules%2C%20the%20red%20color%20background%20rule%20is%20applied%20into%20three%20separate%20noncontinuous%20range%26nbsp%3B%24A%241%3A%24A%2454%26nbsp%3B%20%2C%20range%26nbsp%3B%24D%241%3A%24M%2454%26nbsp%3B%20and%20range%26nbsp%3B%26nbsp%3B%26nbsp%3B%24B%241%3A%24C%2454%3C%2FP%3E%0A%3CP%3Ewhile%20your%20User%20Defined%20function%20range%20input%20is%20the%20whole%20range%26nbsp%3BA1%3AM54.%3C%2FP%3E%0A%3CP%3EThe%20UDF%20looks%20up%20for%20the%20match%20for%20ranges%20used%20in%20the%20conditional%20formatting%20and%20the%20input%20range%20inside%20the%20function%20and%20if%20there%20is%20no%20match%2C%20it%20will%20not%20output%20correct%20result.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ESo%2C%20if%20you%20want%20to%20work%20with%20the%20UDF%20you%20need%20to%20use%20combination%20of%20ranges%20together%20in%20UDF%20exactly%20as%20per%20the%20conditional%20formatting%20range.%26nbsp%3B%20so%20if%20you%20put%20this%26nbsp%3B%3CSTRONG%3E%3DCOUNTConditionColorCells(%24A%241%3A%24A%2454%2CO2)%2BCOUNTConditionColorCells(%24D%241%3A%24M%2454%2CO2)%2BCOUNTConditionColorCells(%24B%241%3A%24C%2454%2CO2)%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3Eit%20will%20return%205%20which%20is%20correct.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3Ebut%20if%20you%20do%20not%20want%20to%20use%20the%20UDF%2C%20then%20you%20can%20acheive%20the%20same%20result%20by%20using%20Excel%20built-in%20Functions%26nbsp%3B%20like%20this%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3E%3DSUMPRODUCT(--(%24A%241%3A%24A%2454%26lt%3B%3D(TODAY()-730)))%2BSUMPRODUCT(--(%24D%241%3A%24M%2454%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3E%26lt%3B%3D(TODAY()-730)))%2BSUMPRODUCT(--(%24B%241%3A%24C%2454%26lt%3B%3DTODAY()-365))%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20above%20formula%20using%20built-in%20Excel%20function%20will%20result%20the%20same%2C%20it%20returns%205.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EHope%20it%20helps.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-204342%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-204342%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20Jamil%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20tried%20to%20work%20the%20count%20cells%20by%20color%20to%20work%20within%20my%20workbook%2C%20but%20one%20sheet%20isn't%20working%20for%20some%20reason.%20I%20have%20attached%20a%20test%20version%20of%20the%20document%20showing%20the%20miscounted%20number.%20I%20have%205%20red%20highlights%2C%20and%20it%20says%202.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%2C%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-197191%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-197191%22%20slang%3D%22en-US%22%3EYou%20are%20welcome%20Andreea.%20Thanks%20for%20the%20feedback.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-197151%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-197151%22%20slang%3D%22en-US%22%3E%3CP%3EThanks%20Jamil%2C%20this%20is%20super!%20exactly%20what%20I%20wanted.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-196763%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-196763%22%20slang%3D%22en-US%22%3E%3CP%3EAndrea%2C%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EI%20think%20you%20can%20easily%20achieve%20the%20result%20you%20need%20without%20over-killing%20it%20with%20conditional%20formatting%20UDF.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3Ein%20I5%20put%20Worldwide%20and%20in%20I6%20put%20USA%20and%20in%20the%20adjacent%20cell%26nbsp%3B%20in%20J5%20put%20this%20formula%20and%20copy%20down%20%3DSUMPRODUCT(--(ISNUMBER(SEARCH(I5%2C%24E%245%3A%24E%2412)))%2C%24F%245%3A%24F%2412)%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3Ethis%20will%20sum%20based%20on%20the%20condition%20given%20and%20the%20good%20part%20about%20this%20is%20that%20you%20do%20not%20need%20to%20save%20your%20excel%20file%20with%20macro%20enabled%20option.%20you%20can%20get%20your%20results%20by%20using%20built-in%20Excel%20functions%20which%20is%20great.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3Eplease%20see%20attached%20workbook%20where%20I%20embedded%20the%20formula%20in%20it.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-196675%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-196675%22%20slang%3D%22en-US%22%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHow%20to%20sum%20conditionally%20formatted%20cells%20based%20on%20adjacent%20cell%3C%2FP%3E%3CP%3EHi%20Jamil%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20tried%20to%20use%20the%20UDF%20you%20shared%20to%20sum%20up%20conditionally%20formatted%20cells%20based%20on%20adjacent%20cell.%20The%20conditional%20formatting%20is%20done%20using%20SEARCH%20formula%2C%20basically%20I%20am%20trying%20to%20sum%20up%20all%20the%20sales%20values%20for%20which%20the%20adjacent%20cell%20(text)%20contains%20certain%20strings.%20I%20saw%20your%20post%20related%20to%20more%20complex%20formulas%20like%20VLOOKUP%20with%20which%20the%20UDF%20doesn't%20work%2C%20not%20sure%20whether%20SEARCH%20falls%20under%20the%20same.%20Appreciated%20if%20you%20can%20look%20into%20it%20and%20let%20me%20know%20in%20case%20something%20can%20be%20done%20so%20the%20UDF%20would%20work%20in%20my%20case%20as%20well.%20Attached%20the%20example%20file.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-196213%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-196213%22%20slang%3D%22en-US%22%3E%3CP%3EMichael%2C%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3Eplease%20see%20attached%20example%20for%20COUNT%20as%20requested.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-196100%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-196100%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20Jamil%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHow%20do%20I%20use%20the%20UDF%20to%20work%20on%20all%20the%20excel%20files%20by%20default%2C%20not%20just%20a%20specific%20one%3F%20Is%20there%20a%20way%20to%20set%20it%20up%20under%20personal%20macro%20file%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-192081%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-192081%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%20this%20is%20exactly%20what%20I'm%20looking%20for%20but%20I%20just%20need%20count%20not%20sum.%26nbsp%3B%20Is%20it%20easy%20to%20re-produce%20this%20as%20a%20countif%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-186758%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-186758%22%20slang%3D%22en-US%22%3EHi%20Fenfen%2C%3CBR%20%2F%3E%3CBR%20%2F%3EIt%20is%20because%20the%20conditional%20formatting%20formula%20of%20Vlookup%20uses%20the%20same%20range%20that%20is%20used%20in%20the%20formula%20on%20the%20cells%20that%20produce%20the%20numeric%20results%2C%20so%20it%20is%20kinda%20create%20circular%20reference%20in%20a%20nontraditional%20way.%20The%20UDF%20is%20not%20designed%20to%20handle%20this%20sort%20of%20complex%20scenario.%20the%20UDF%20works%20on%20the%20simple%20conditional%20formatting%20that%20would%20use%20a%20formula%20that%20evaluate%20cells%20that%20has%20either%20simple%20values%20or%20if%20they%20have%20formulas%2C%20they%20are%20not%20using%20the%20same%20range%20as%20the%20formula%20used%20in%20the%20conditional%20formatting.%20%3CBR%20%2F%3E%3CBR%20%2F%3EI%20suggest%20you%20use%20the%20other%20methods%20described%20in%20the%20earlier%20posts%2C%20like%20combination%20of%20SUMPRODCUCT%20with%20COUNTIFS%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-186704%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-186704%22%20slang%3D%22en-US%22%3E%3CP%3EH%3C%2FP%3E%3CBLOCKQUOTE%3E%3CHR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F24499%22%20target%3D%22_blank%22%3E%40Jamil%20Mohammad%3C%2FA%3E%26nbsp%3Bwrote%3A%3CBR%20%2F%3E%3CP%3EHi%20Fenfen%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Eyou%20have%20given%20the%20range%20of%20cell%20into%20the%20UDF%20range%20arguments%20cells%20that%20do%20not%20have%20conditional%20formatting%20applied%20to%20them.%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EUDF%20will%20throw%20error%20if%20range%20of%20cell%20given%20as%20input%20that%20do%20not%20have%20conditional%20formatting%20rule%20applied%20to%20it.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Eso%20to%20make%20your%20workbook%20work.%20you%20could%20achieve%20the%20result%20by%20using%20a%20combined%20addition%26nbsp%3B%3C%2FP%3E%3CPRE%3E%3DCOUNTConditionColorCells(B3%3AI3%2CJ2)%2BCOUNTConditionColorCells(B8%3AI8%2CJ2)%2BCOUNTConditionColorCells(B13%3AI13%2CJ2)%2B%2BCOUNTConditionColorCells(B18%3AI18%2CJ2)%3C%2FPRE%3E%3CP%3Esee%20attached%20file.%3C%2FP%3E%3CHR%20%2F%3E%3C%2FBLOCKQUOTE%3E%3CP%3EHi%20Jamil%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20tried%2C%20but%20its%20not%20working.%20cause%20my%20the%20color%20will%20be%20change%20anytime.%20please%20see%20sample%20file.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-186678%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-186678%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%20thanks%20for%20your%20respond.%3C%2FP%3E%3CP%3EDoes%20the%20formula%20of%20conditional%20formatting%20for%20format%20cell%20that%20contain%20can%20be%20applied%20using%20this%20code%3F%3F%3C%2FP%3E%3CP%3EI%20cannot%20link%20my%20problem%20with%20the%20others%20as%20they%20might%20using%20different%20conditional%20formatting%20formula..%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-186414%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-186414%22%20slang%3D%22en-US%22%3EHi%20ogyramly%2C%3CBR%20%2F%3E%3CBR%20%2F%3EPlease%20read%20the%20earlier%20posts%20through%20this%20thread%20and%20try%20the%20suggestion%20given%20and%20the%20limitations%20of%20the%20UDF%2C%20i%20suspect%20that%20one%20of%20the%20issues%20already%20known%20could%20have%20caused%20the%20UDF%20to%20return%20no%20color.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-186408%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-186408%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20Fenfen%2C%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3Eyou%20have%20given%20the%20range%20of%20cell%20into%20the%20UDF%20range%20arguments%20cells%20that%20do%20not%20have%20conditional%20formatting%20applied%20to%20them.%26nbsp%3B%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EUDF%20will%20throw%20error%20if%20range%20of%20cell%20given%20as%20input%20that%20do%20not%20have%20conditional%20formatting%20rule%20applied%20to%20it.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3Eso%20to%20make%20your%20workbook%20work.%20you%20could%20achieve%20the%20result%20by%20using%20a%20combined%20addition%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3E%3DCOUNTConditionColorCells(B3%3AI3%2CJ2)%2BCOUNTConditionColorCells(B8%3AI8%2CJ2)%2BCOUNTConditionColorCells(B13%3AI13%2CJ2)%2B%2BCOUNTConditionColorCells(B18%3AI18%2CJ2)%3C%2FPRE%3E%0A%3CP%3Esee%20attached%20file.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-185681%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-185681%22%20slang%3D%22en-US%22%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F32777i59254F61C749984B%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22colored%20cell.PNG%22%20title%3D%22colored%20cell.PNG%22%20%2F%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%200px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F32774i56F8C032B84A82E4%2Fimage-size%2Fsmall%3Fv%3D1.0%26amp%3Bpx%3D200%22%20width%3D%220%22%20height%3D%220%22%20alt%3D%22count%20cell.PNG%22%20title%3D%22count%20cell.PNG%22%20%2F%3E%3C%2FSPAN%3EHi%20there%2C%3C%2FP%3E%3CP%3EI'm%20using%20your%20code%20to%20count%20my%20conditional%20formatting%20colored%20cell%2C%20but%20the%20cell%20cannot%20be%20counted.%20The%20code%20maybe%20cannot%20read%20my%20colored%20data%20cell.%20Could%20you%20please%20help%20me%3F%20It%20shows%20no%20color%20when%20I'm%20trying%20to%20use%20the%20CountConditionColorCells%20formula.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ETq..%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-185503%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-185503%22%20slang%3D%22en-US%22%3E%3CP%3EHey%20Jamil%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ethe%20code%20is%20not%20working%20on%20my%20file%2C%20could%20you%20please%20help%20me.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-181824%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-181824%22%20slang%3D%22en-US%22%3E%3CP%3EThank%20you%20Jamil%2C%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIs%20there%20any%20solution%20for%20that%3F%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAppreciate%20your%20help.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-181802%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-181802%22%20slang%3D%22en-US%22%3E%3CP%3ESuril%2C%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3Eyou%20have%20used%20the%20UDF%20as%20COUNTIFs%20function%20which%20does%20not%20work.%26nbsp%3B%20It%20accept%20one%20range%20and%20one%20criteria%2C%20it%20does%20not%20work%20when%20multiple%20criteria%20and%20ranges%20are%20given%20in%20the%20UDF%20argument.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-181794%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-181794%22%20slang%3D%22en-US%22%3E%3CP%3EHey%20Jamil%2C%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%26nbsp%3B%20used%20the%20count%20condition%20to%20calculate%20the%20cells%20based%20on%20conditional%20formatting%20and%20for%20some%20reason%20at%20first%20it%20showed%20No%20COUNT%20and%20now%20it%20shows%20value%20error.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20attaching%20the%20file.%20Can%20you%20please%20look%20at%20it%20and%20provide%20your%20feedback%20on%20how%20to%20fix%20the%20error.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ENote%3A%20-%20I%20changed%20the%20name%20from%26nbsp%3B%20.xlsm%20to%20.xls%20to%20upload%20it%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-178203%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-178203%22%20slang%3D%22en-US%22%3E%3CP%3EJamil%2C%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EI%20am%20not%20sure%20why%20this%20would%20not%20be%20working%20either%2C%20as%20the%20conditional%20formatting%20is%20being%20determined%20by%20formulas.%26nbsp%3B%20Perhaps%20this%20is%20not%20working%20due%20to%20an%20add-in%20(or%20lack%20thereof)%2C%20or%20perhaps%20it%20has%20to%20do%20with%20the%20cells%20with%20conditional%20formatting%20having%20drop-down%20lists%3F%26nbsp%3B%20I%20have%20attached%20a%20draft%20of%20my%20workbook%20for%20your%20reference.%26nbsp%3B%20Would%20you%20be%20able%20to%20take%20a%20look%20and%20try%20to%20see%20why%20the%20formula%20based%20on%20your%20UDF%20won't%20calculate%3F%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThanks%20for%20your%20help!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-176488%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-176488%22%20slang%3D%22en-US%22%3EHi%20Cara%2C%3CBR%20%2F%3E%3CBR%20%2F%3EI%20looked%20the%20file%20you%20attached.%20there%20were%20many%20issues%20that%20probably%20caused%20that%20error.%3CBR%20%2F%3E%3CBR%20%2F%3EA)%20The%20workbook%20had%20No%20UDF%20in%20it.%20hence%20NAME%3F%20Error%3CBR%20%2F%3EB)%20this%20UDF%20has%20two%20limitations%201-%20it%20will%20only%20work%2C%20if%20your%20rules%20of%20conditional%20formatting%20is%20created%20using%20conditional%20formatting%20rules%20with%20formula%20aka%20(use%20a%20formula%20to%20determine%20which%20cells%20to%20format)%20and%20I%20could%20see%20in%20the%20workbook%20you%20shared%20that%20there%20were%20two%20rules%20which%20was%20not%20determined%20by%20formula%202-%20Second%20the%20UDF%20will%20only%20work%20if%20sum%20range%20is%20more%20than%20one%20cell%20in%20another%20word%2C%20it%20will%20not%20sum%20a%20single%20cell%20or%20if%20Conditional%20formatting%20rule%20is%20applied%20in%20range%20that%20is%20a%20single%20cell.%20In%20your%20workbook%20there%20were%20multiple%20rules%20that%20applied%20in%20single%20cells.%3CBR%20%2F%3E%3CBR%20%2F%3EAs%20I%20suggested%20in%20my%20earlier%20posts%2C%20If%20the%20UDF%20works%2C%20then%20fine%2C%20if%20does%20not%20work%20then%20it%20is%20not%20the%20only%20and%20optimal%20solution.%20%20So%2C%20rather%20than%20Counting%20based%20on%20the%20outcome%20of%20the%20conditional%20formatting%2C%20you%20can%20use%20the%20same%20criteria%20as%20exists%20in%20the%20conditional%20formatting%20to%20Count%20the%20cells%20using%20COUNTIFS%20or%20SUMPRODUCT%3CBR%20%2F%3E%3CBR%20%2F%3EI%20didn't%20examine%20in%20in%20depth%20your%20workbook%20as%20the%20data%20validation%20were%20linked%20to%20another%20workbook%20and%20for%20me%20it%20was%20showing%20a%20broken%20link.%20%20You%20could%20use%20the%20conditional%20formula%20to%20return%20values%20in%20column%20G%20and%20based%20on%20the%20values%20you%20could%20simply%20count%20the%20overdues%20with%20simply%20formula%20like%20this%20%3DCOUNTIF(G9%3AG28%2CG5)%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-176471%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-176471%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20Steve%2C%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EI%20have%20attached%20the%20workbook%20that%20shows%20the%20count%20of%20conditional%20formatted%20area%20that%20has%20text%20values%20in%20them.%26nbsp%3B%20it%20works.%26nbsp%3B%20I%20have%20no%20idea%20why%26nbsp%3Bit%20does%20not%20work%20in%20your%20workbook.%20Perhaps%2C%20your%20workbook%20conditional%20format%20rules%20are%20not%20set%20by%20formulas.%26nbsp%3B%20Please%20read%20the%20limitation%20of%20the%20UDF%20in%20my%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2FMacros-and-VBA%2Fsum-by-color-when-colors-are-set-by-conditional-formatting%2Fm-p%2F40312%2Fhighlight%2Ftrue%23M28%22%20target%3D%22_blank%22%3Epost%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAlternatively%2C%20If%20it%20does%20not%20work%20then%20I%20suggest%20that%20rather%20than%20Counting%20or%20Summing%20based%20on%20the%20outcome%20of%20the%20conditional%20formatting%2C%20you%20use%20the%20same%20criteria%20as%20exists%20in%20the%20conditional%20formatting%20to%20Count%20or%20Sum%20the%20cells%20using%20SUMIFS%2FCOUNTIFS%20or%20SUMPRODUCT%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-175969%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-175969%22%20slang%3D%22en-US%22%3E%3CP%3EStill%20getting%20the%20same%20error%2C%20thank%20you%20for%20taking%20a%20look%2C%20it's%20attached.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-175957%22%20slang%3D%22en-US%22%3ERE%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-175957%22%20slang%3D%22en-US%22%3ESUMIFS%20and%20SUMIF%20I%20don't%20think%20work.%20The%20problem%20as%20far%20as%20I%20can%20see%20is%0Athat%20conditional%20formats%20are%20volatile%20and%20must%20calculate%20after%20all%20cells%0Ahave%20calculated.%20Therefore%20you%20cannot%20have%20a%20function%20that%20will%20sum%20the%0Adisplayformat%20color%20easily.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-175420%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-175420%22%20slang%3D%22en-US%22%3E%3CP%3EJamil%2C%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThis%20modified%20code%20does%20not%20seem%20to%20be%20working.%26nbsp%3B%20I%20am%20getting%20a%20%23VALUE!%20error%20in%20my%20target%20cell%20that%20should%20be%20displaying%20the%20count%20of%20cells%20with%20colored%20text%20in%20my%20selected%20cell%20range.%26nbsp%3B%20Would%20there%20be%20any%20part%20of%20the%20code%20I%20would%20need%20to%20change%20so%20that%20it%20will%20work%20with%20my%20cell%20range%20containing%20text%3F%26nbsp%3B%20It%20doesn't%20seem%20to%20matter%20whether%20I%20choose%20General%20or%20Text%20for%20the%20cell%20format%2C%20the%20formula%20still%20results%20in%20a%20%23VALUE!%20error.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-174923%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-174923%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20Steve%2C%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EI%20have%20modified%20the%20code%20and%20attached%20is%20the%20version%20that%20counts%20instead%20of%20sum.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F30793iCD85E66069079371%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22a.png%22%20title%3D%22a.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-174840%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-174840%22%20slang%3D%22en-US%22%3E%3CP%3EThanks%20Jamil%2C%20this%20gets%20me%20very%20close.%26nbsp%3B%20However%2C%20I%20suppose%20what%20I%20really%20need%20is%20for%20this%20VBA%20to%20count%20the%20number%20of%20cells%20within%20the%20selected%20range%20if%20they%20are%20a%20certain%20color%2C%20not%20sum%20the%20values%20within%20the%20cells%2C%20as%20the%20values%20within%20the%20selected%20cell%20range%20are%20text%2C%20not%20numbers.%26nbsp%3B%20What%20would%20I%20change%20in%20the%20VBA%20to%20accommodate%20this%3F%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ERegards%2C%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E-Steve%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-174490%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-174490%22%20slang%3D%22en-US%22%3E%3CP%3ESometimes%20this%20happens%2C%20if%20you%20have%20an%20external%20Add-in%20or%20there%20are%20some%20codes%20in%20the%20PERSONAL.XLSB%20workbook.%3CBR%20%2F%3E%3CBR%20%2F%3Eclick%20on%20the%20cell%20that%20has%20%23Value%20error%20and%20then%20press%20F2%20to%20go%20to%20Edit%20mode%20and%20then%20enter%20again.%20if%20you%20see%20the%20VALUE%20error%20disappear%20that%20means%20that%20the%20error%20is%20caused%20by%20some%20external%20add-in%20or%20your%20personal.xlsb%20workbook%20that%20is%20in%20the%20start%20up%20folder.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIf%20you%20can%20share%20a%20dummy%20example%20file%2C%20I%20can%20take%20a%20look%20at%20it.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-174487%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-174487%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20Steve%2C%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIf%20you%20mean%20the%20font%20color%20set%20by%20conditional%20formatting.%20then%20you%20can%20change%20the%20line%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EFrom%3C%2FP%3E%0A%3CPRE%3EIf%20CellsRange.FormatConditions(CF1).Interior.ColorIndex%20%3D%20ColorRng.Interior.ColorIndex%20Then%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CBR%20%2F%3ETo%3C%2FP%3E%0A%3CPRE%3EIf%20CellsRange.FormatConditions(CF1).Font.Color%20%3D%20ColorRng.Font.Color%20Then%3C%2FPRE%3E%0A%3CP%3EPlease%20see%20it%20in%20the%20attached%20sample%20workbook.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-174384%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-174384%22%20slang%3D%22en-US%22%3E%3CP%3EGood%20evening%20Jamil%2C%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EDo%20you%20happen%20to%20have%20a%20version%20of%20this%20UDF%20which%20would%20sum%20cells%20with%20a%20given%20font%20color%20rather%20than%20an%20interior%2Fbackground%20color%3F%26nbsp%3B%20I%20have%20tried%20changing%20the%20word%20%22Interior%22%20to%20%22Font%22%20in%20the%20UDF%2C%20however%20when%20I%20run%20the%20formula%20on%20my%20desired%20cell%2C%20it%20simply%20shows%20%22NO-COLOR%22%20rather%20than%20adding%20the%20cells%20with%20the%20desired%20conditionally%20formatted%20text%20color.%26nbsp%3B%20Any%20help%20would%20be%20appreciated.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ERegards%2C%3C%2FP%3E%0A%3CP%3E-Steve%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-173871%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-173871%22%20slang%3D%22en-US%22%3E%3CP%3EHi!%26nbsp%3B%20I've%20also%20been%20getting%20the%20%23Value%20error.%26nbsp%3B%20I%20copied%20and%20pasted%20the%20Count%20version%20of%20the%20VBA.%26nbsp%3B%20Screen%20shot%20attached%20let%20me%20know%20if%20you%20need%20more.%26nbsp%3B%20I%20entered%20the%20RGB%20color%20codes%20so%20they%20are%20exact.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-173315%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-173315%22%20slang%3D%22en-US%22%3ECan%20you%20post%20a%20screenshot%20of%20dummy%20data%20or%20a%20dummy%20excel%20file%3F%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-173281%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-173281%22%20slang%3D%22en-US%22%3E%3CP%3EWhen%20I%20use%20the%20code%2C%20it%20shows%20%23VALUE!.%20This%20is%20happening%20once%20the%20condition%20changes.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EI%20am%20using%20Excel%202016%20with%20Windows%2010%20Pro.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-173109%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-173109%22%20slang%3D%22en-US%22%3E%22does%20this%20work%20for%20the%20color%20WHITE%20as%20well%3F%20%22%3CBR%20%2F%3EThere%20are%20two%20things%20not%20to%20mixup%20the%20WHITE%20background%20color%20with%20No-Background%20Color.%3CBR%20%2F%3E%3CBR%20%2F%3EIf%20your%20cells%20have%20conditional%20formatting%20and%20the%20color%20is%20selected%20is%20plaint%20white%20then%20yes%20it%20works.%20but%20if%20the%20cells%20have%20No%20color%20meaning%20it%20the%20background%20color%20is%20None%20then%20it%20does%20not%20work.%3CBR%20%2F%3E%3CBR%20%2F%3ERE%3A%20on%20your%20second%20question%3A%3CBR%20%2F%3Eyou%20need%20to%20check%20the%20colors%20of%20your%20conditionally%20formatted%20cells%20and%20the%20color%20of%20criteria.%20they%20must%20match%20100%25.%20sometimes%2C%20the%20colors%20look%20similar%20while%20they%20are%20different%2C%20best%20way%20to%20guarantee%20you%20are%20using%20the%20exact%20same%20color%20is%20to%20find%20that%20specific%20color's%20color%20code%20and%20that%20you%20can%20do%20by%20using%20VBA%20to%20find%20the%20color%20code%20of%20your%20cells.%3CBR%20%2F%3EIf%20you%20do%20not%20want%20to%20go%20in%20that%20direction%20then%20i%20suggest%20you%20rebuild%20your%20conditional%20formatting%20cells%20by%20selecting%20a%20simple%20color%20and%20then%20also%20use%20the%20same%20color%20in%20the%20criteria%20cell.%3CBR%20%2F%3Ein%20case%20if%20you%20wanted%20to%20find%20out%20the%20color%20code%20with%20VBA%20then%20here%20is%20a%20link%20%3CA%20href%3D%22https%3A%2F%2Fwww.thespreadsheetguru.com%2Fthe-code-vault%2F2014%2F11%2F5%2Fretrieve-excel-cells-font-fill-rgb-color-code%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fwww.thespreadsheetguru.com%2Fthe-code-vault%2F2014%2F11%2F5%2Fretrieve-excel-cells-font-fill-rgb-color-code%3C%2FA%3E%20that%20explains%20how.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-172388%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-172388%22%20slang%3D%22en-US%22%3E%3CP%3EOn%20your%20worksheet%20all%20the%20colors%20work%20just%20fine.%20But%20on%20mines%2C%20for%20some%20reason%20only%201%20out%20of%203%20colors%20i'm%20using%20works%2C%20the%20light%20blue.%20Those%20columns%20that%20are%20highlighted%20are%20conditionally%20formatted%20using%20a%20formula.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EI've%20made%203%20sample%20formula%20for%20each%20of%20the%20colors.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-172373%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-172373%22%20slang%3D%22en-US%22%3EJamil%2C%20does%20this%20work%20for%20the%20color%20WHITE%20as%20well%3F%20i%20seem%20to%20get%20the%20error%20%22%23VALUE!%22%20when%20using%20the%20SumConditionColorCells%20formula.%20Other%20colors%20seems%20to%20work.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-170254%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-170254%22%20slang%3D%22en-US%22%3E%3CP%3EHello%26nbsp%3BBethany%2C%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EYes%2C%20I%20have%20attached%20it%20here.%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-170124%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-170124%22%20slang%3D%22en-US%22%3E%3CP%3EHello!%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EDo%20you%20have%20a%20sample%20excel%20file%20where%20you%20use%20the%20count%20by%20conditional%20format%3F%3C%2FP%3E%0A%3CP%3EI%20am%20having%20problems%20using%20it.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThanks!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-170101%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-170101%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3CSPAN%3ETillo%2C%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EI%20looked%20at%20your%20file.%20you%20are%20using%20a%20incorrect%20UDF%20to%20sum%20cells%20based%20on%20conditional%20formatting.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EI%20cannot%20fill%20your%20template%20for%20you.%26nbsp%3B%20you%20need%20to%20copy%20the%20below%20UDF%20put%20it%20in%20a%20module%20in%20your%20workbook.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3Ethen%20use%20it%20in%20your%20workbook%20%3DSumConditionColorCells(CellsRange%20As%20Range%2C%20ColorRng%20As%20Range)%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%3Elike%20this%26nbsp%3B%3DSumConditionColorCells(O%249%3AO%2440%2C%24N6)%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EI%20found%20another%20problem%20with%20your%20workbook.%20the%20color%20used%20in%20the%20conditional%20formatting%20and%20the%20cells%20referenced%20as%20the%20color%20criteria%20e.g.%26nbsp%3B%24N6%20are%20not%20the%20same%20color.%26nbsp%3B%20unless%20they%20are%20the%20exact%20same%20color%2C%20the%20UDF%20will%20not%20work.%26nbsp%3B%20%26nbsp%3BI%20have%20attached%20a%20workbook%20that%20shows%20how%20the%20UDF%20works.%20so%20you%20need%20to%20adapt%20that%20in%20your%20own%20workbook.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3ESorry%2C%20I%20cannot%20help%20further%20on%20this.%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3EFunction%20SumConditionColorCells(CellsRange%20As%20Range%2C%20ColorRng%20As%20Range)%0ADim%20Bambo%20As%20Boolean%0ADim%20dbw%20As%20String%0ADim%20CFCELL%20As%20Range%0ADim%20CF1%20As%20Single%0ADim%20CF2%20As%20Double%0ADim%20CF3%20As%20Long%0ABambo%20%3D%20False%0AFor%20CF1%20%3D%201%20To%20CellsRange.FormatConditions.Count%0AIf%20CellsRange.FormatConditions(CF1).Interior.ColorIndex%20%3D%20ColorRng.Interior.ColorIndex%20Then%0ABambo%20%3D%20True%0AExit%20For%0AEnd%20If%0ANext%20CF1%0ACF2%20%3D%200%0ACF3%20%3D%200%0AIf%20Bambo%20%3D%20True%20Then%0AFor%20Each%20CFCELL%20In%20CellsRange%0Adbw%20%3D%20CFCELL.FormatConditions(CF1).Formula1%0Adbw%20%3D%20Application.ConvertFormula(dbw%2C%20xlA1%2C%20xlR1C1)%0Adbw%20%3D%20Application.ConvertFormula(dbw%2C%20xlR1C1%2C%20xlA1%2C%20%2C%20ActiveCell.Resize(CellsRange.Rows.Count%2C%20CellsRange.Columns.Count).Cells(CF3%20%2B%201))%0AIf%20Evaluate(dbw)%20%3D%20True%20Then%20CF2%20%3D%20CF2%20%2B%20CFCELL.Value%0ACF3%20%3D%20CF3%20%2B%201%0ANext%20CFCELL%0AElse%0ASumConditionColorCells%20%3D%20%22NO-COLOR%22%0AExit%20Function%0AEnd%20If%0ASumConditionColorCells%20%3D%20CF2%0AEnd%20Function%0A%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-170076%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-170076%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20Jamil%2C%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3Eattached%20the%20file%20with%20content.%3C%2FP%3E%0A%3CP%3EIt%20would%20be%20great%20if%26nbsp%3Bthe%20cells%20can%20be%20summed%20when%20the%20color%20is%20set%20by%20conditional%20formatting.%3C%2FP%3E%0A%3CP%3Einside%20the%20excel%20file%20I%20insert%20some%20remarks%20and%20tekst%20for%20declaration.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ETillo%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-167159%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-167159%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EI%20just%20noticed%20that%20the%20zip%20file%20you%20uploaded%20is%20blank.%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3Ebesides%2C%20this%20thread%20is%20related%20to%20conditional%20formatting%2C%20so%20i%20suggest%20you%20open%20a%20new%20question%20with%20uploading%20the%20sample%20file%20with%20it.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-165295%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-165295%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20Jamil%2C%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3Eherewith%20the%20sample%20file.%3C%2FP%3E%0A%3CP%3E%26nbsp%3Bappreciate%20your%20input.%3C%2FP%3E%0A%3CP%3EI%20put%20some%20comment%20in%20the%20file.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EKR%20T.aerdts%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-165115%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-165115%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3Bt.aerdts%2C%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EI%20think%20that%20can%20be%20achieved%20using%20Formulas%20with%20the%20referred%20UDF.%20If%20you%20post%20a%20sample%20dummy%20data%20here%20and%20I%20will%20have%20a%20look%20in%20the%20weekend.%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-165090%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-165090%22%20slang%3D%22en-US%22%3E%3CP%3EYes%2C%20it%20is%20possible%20and%20here%20it%20goes.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3EFunction%20COUNTConditionColorCells(CellsRange%20As%20Range%2C%20ColorRng%20As%20Range)%0ADim%20Bambo%20As%20Boolean%0ADim%20dbw%20As%20String%0ADim%20CFCELL%20As%20Range%0ADim%20CF1%20As%20Single%0ADim%20CF2%20As%20Double%0ADim%20CF3%20As%20Long%0ABambo%20%3D%20False%0AFor%20CF1%20%3D%201%20To%20CellsRange.FormatConditions.Count%0AIf%20CellsRange.FormatConditions(CF1).Interior.ColorIndex%20%3D%20ColorRng.Interior.ColorIndex%20Then%0ABambo%20%3D%20True%0AExit%20For%0AEnd%20If%0ANext%20CF1%0ACF2%20%3D%200%0ACF3%20%3D%200%0AIf%20Bambo%20%3D%20True%20Then%0AFor%20Each%20CFCELL%20In%20CellsRange%0Adbw%20%3D%20CFCELL.FormatConditions(CF1).Formula1%0Adbw%20%3D%20Application.ConvertFormula(dbw%2C%20xlA1%2C%20xlR1C1)%0Adbw%20%3D%20Application.ConvertFormula(dbw%2C%20xlR1C1%2C%20xlA1%2C%20%2C%20ActiveCell.Resize(CellsRange.Rows.Count%2C%20CellsRange.Columns.Count).Cells(CF3%20%2B%201))%0AIf%20Evaluate(dbw)%20%3D%20True%20Then%20CF2%20%3D%20CF2%20%2B%201%0ACF3%20%3D%20CF3%20%2B%201%0ANext%20CFCELL%0AElse%0ACOUNTConditionColorCells%20%3D%20%22NO-COLOR%22%0AExit%20Function%0AEnd%20If%0ACOUNTConditionColorCells%20%3D%20CF2%0AEnd%20Function%0A%0A%3C%2FPRE%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-164526%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-164526%22%20slang%3D%22en-US%22%3E%3CP%3EIs%20it%20possible%20for%20cell%20count%20instead%20of%20sum.%20Please%20share%20the%20VBA%20code%20if%20possible.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-131761%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-131761%22%20slang%3D%22en-US%22%3EHi%20Jamil%2C%3CBR%20%2F%3E%3CBR%20%2F%3EI%20have%20a%20GANT%20diagram%20for%20were%20I%20want%20to%20sum%20the%20values%20in%20column%20cells%20with%20a%20specific%20colour.%3CBR%20%2F%3EThis%20is%20to%20sum%20how%20many%20labour%20hours%20we%20have%20to%20make%20each%20day%20for%20a%20specific%20background%20color%20that%20was%20generated%20by%20the%20conditional%20formatting.%20%20%3CBR%20%2F%3E%3CBR%20%2F%3EIn%20this%20GANT%20diagram%20a%20pop%20up%20boxt%20can%20not%20be%20used.%20Do%20you%20have%20a%20solution%20for%20that%3F%3CBR%20%2F%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%20%20%20%20%20%20%20%20%3CBR%20%2F%3E%20%20%20%20%20%20%20%20%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-126992%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-126992%22%20slang%3D%22en-US%22%3EYou%20are%20welcome.%20Thanks%20for%20the%20feedback%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-125408%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-125408%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20Jamil%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20again%20for%20the%20response.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI've%20just%20tried%20your%20amended%20code%20and%20it%20works%20perfectly.%26nbsp%3B%20Your%20help%20on%20this%20is%20very%20much%20appreciated!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EBest%20Regards%2C%3C%2FP%3E%3CP%3EMicheal%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-125404%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-125404%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20Michael%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EOk.%26nbsp%3B%20Can%20you%20please%20replace%20the%20previous%20UDF%20with%20this%20one%20attached%20below.%20This%26nbsp%3Bshould%20fix%20the%20problem.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EPlease%20let%20me%20know%20how%20it%20goes.%3C%2FP%3E%3CPRE%3EFunction%20SumConditionColorCells(CellsRange%20As%20Range%2C%20ColorRng%20As%20Range)%0ADim%20Bambo%20As%20Boolean%0ADim%20dbw%20As%20String%0ADim%20CFCELL%20As%20Range%0ADim%20CF1%20As%20Single%0ADim%20CF2%20As%20Double%0ADim%20CF3%20As%20Long%0ABambo%20%3D%20False%0AFor%20CF1%20%3D%201%20To%20CellsRange.FormatConditions.Count%0AIf%20CellsRange.FormatConditions(CF1).Interior.ColorIndex%20%3D%20ColorRng.Interior.ColorIndex%20Then%0ABambo%20%3D%20True%0AExit%20For%0AEnd%20If%0ANext%20CF1%0ACF2%20%3D%200%0ACF3%20%3D%200%0AIf%20Bambo%20%3D%20True%20Then%0AFor%20Each%20CFCELL%20In%20CellsRange%0Adbw%20%3D%20CFCELL.FormatConditions(CF1).Formula1%0Adbw%20%3D%20Application.ConvertFormula(dbw%2C%20xlA1%2C%20xlR1C1)%0Adbw%20%3D%20Application.ConvertFormula(dbw%2C%20xlR1C1%2C%20xlA1%2C%20%2C%20ActiveCell.Resize(CellsRange.Rows.Count%2C%20CellsRange.Columns.Count).Cells(CF3%20%2B%201))%0AIf%20Evaluate(dbw)%20%3D%20True%20Then%20CF2%20%3D%20CF2%20%2B%20CFCELL.Value%0ACF3%20%3D%20CF3%20%2B%201%0ANext%20CFCELL%0AElse%0ASumConditionColorCells%20%3D%20%22NO-COLOR%22%0AExit%20Function%0AEnd%20If%0ASumConditionColorCells%20%3D%20CF2%0AEnd%20Function%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-124992%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-124992%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20Jamil%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20for%20the%20quick%20response.%26nbsp%3B%20It%20definitely%20appears%20to%20be%20a%20rounding%20issue.%26nbsp%3B%20I%20looked%20at%20a%20smaller%20set%20of%20data%20and%20ran%20some%20tests%20on%20it.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20data%20I%20tested%20was%20the%20following%206%20values%20-%2045.18%2C%2045.26%2C%2045.21%2C%2045.39%2C%2045.24%2C%2045.41%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20sum%20value%20should%20be%20271.69%2C%20however%20the%20function%20is%20returning%20a%20sum%20of%20270.00%20(which%20is%20each%20value%20rounded%20to%20its%20nearest%20whole%20number%20-%2045*6)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20then%20changed%20the%20first%20value%20to%2045.68%2C%20at%20which%20point%20the%20function%20returned%20a%20sum%20of%20271.00%20(rounding%20the%20first%20value%20up%20to%2046%2C%20and%20continuing%20to%20round%20the%20remaining%20values%20down%20to%2045)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EUnfortunately%20I'm%20not%20in%20a%20position%20to%20attach%20any%20samples%2C%20but%20if%20there%20is%20any%20reason%20that%20you%20think%20this%20issue%20is%20occurring%20then%20please%20let%20me%20know.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20in%20advance.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EMicheal%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-124987%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-124987%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20Michael%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ethere%20is%20no%20rounding%20issue.%20my%20suggestion%20is%20to%20revisit%20the%20colors%20and%20try%20to%20run%20the%20test%20on%20a%20smaller%20data%20set%20and%20see%20how%20it%20goes.%26nbsp%3B%20%26nbsp%3B%20if%20you%20can%20provide%20a%20sample%20dummy%20example.%20i%20can%20take%20a%20look.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-124984%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-124984%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20Jamil%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20came%20across%20your%20solution%20to%20a%20similar%20query%20i%20have%2C%20and%20tried%20applying%20it%20to%20my%20data.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIt%20almost%20works%20however%20the%20summed%20total%20is%20slightly%20off%20the%20total%20when%20i%20manually%20sum%20the%20data.%26nbsp%3B%20it%20seems%20like%20it%20may%20be%20a%20rounding%20issue....do%20you%20have%20any%20suggestions%20on%20how%20to%20resolve%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20in%20advance%2C%3C%2FP%3E%3CP%3EMicheal%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-40690%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-40690%22%20slang%3D%22en-US%22%3E%3CP%3EHello%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Etake%20a%20look%20at%20%3CA%20href%3D%22https%3A%2F%2Fanswers.microsoft.com%2Fen-us%2Fmsoffice%2Fforum%2Fmsoffice_excel-mso_windows8%2Fcounting-cells-background-colour-has-been-altered%2Fc3858d21-75f9-489c-83f8-b796139c3399%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ethis%20question%3C%2FA%3E%20in%20the%20Microsoft%20Community%20formerly%20known%20as%20the%20%22Answers%22%20Q%26amp%3BA%20forum.%20(I%20know%2C%20the%20%22Community%22%20site%20name%20is%20confusing%20to%20have%20on%20two%20different%20sites).%20%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EMake%20sure%20to%20look%20at%20all%20the%20replies%20to%20see%20how%20to%20get%20from%20conditional%20formatting%20to%20a%20Sumifs%20or%20Countifs%20formula.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-40312%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-40312%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20matt%20nipper%2C%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3Esince%20you%20mentioned%20that%20you%20%22%3CSPAN%3Ehave%20done%20an%20exhaustive%20search%20online%22%20i%20have%20come%20up%20with%20a%20solution%20for%20you%2C%20although%20it%20has%26nbsp%3Btwo%20limitations%20A)%26nbsp%3Bit%20will%20only%20work%2C%20if%20your%20rules%20of%20conditional%20formatting%20is%20created%20using%20conditional%20formatting%20rules%20with%20formula%20aka%20(use%20a%20formula%20to%20determine%20which%20cells%20to%20format)%20and%20B)%20the%20UDF%20will%20only%20work%20if%20sum%20range%20is%20more%20than%20one%20cell%20another%20word%2C%20it%20will%20not%20sum%20a%20single%20cell%2C%20as%20well%20as%20the%20conditional%20formatted%20range%20is%20more%20than%20one%20cell.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3Ethe%20example%20file%2C%20you%20can%20download%20it%20from%20here.%20I%26nbsp%3Bcould%20not%20upload%20it%20here%2C%20as%20it%20is%20a%26nbsp%3B%3CSPAN%3EExcel%20Macro-enabled%20Workbook%20that%20contains%20the%20UDF%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3EFunction%20SumConditionColorCells(CellsRange%20As%20Range%2C%20ColorRng%20As%20Range)%0ADim%20Bambo%20As%20Boolean%0ADim%20dbw%20As%20String%0ADim%20CFCELL%20As%20Range%0ADim%20CF1%20As%20Single%0ADim%20CF2%20As%20Double%0ADim%20CF3%20As%20Long%0ABambo%20%3D%20False%0AFor%20CF1%20%3D%201%20To%20CellsRange.FormatConditions.Count%0AIf%20CellsRange.FormatConditions(CF1).Interior.ColorIndex%20%3D%20ColorRng.Interior.ColorIndex%20Then%0ABambo%20%3D%20True%0AExit%20For%0AEnd%20If%0ANext%20CF1%0ACF2%20%3D%200%0ACF3%20%3D%200%0AIf%20Bambo%20%3D%20True%20Then%0AFor%20Each%20CFCELL%20In%20CellsRange%0Adbw%20%3D%20CFCELL.FormatConditions(CF1).Formula1%0Adbw%20%3D%20Application.ConvertFormula(dbw%2C%20xlA1%2C%20xlR1C1)%0Adbw%20%3D%20Application.ConvertFormula(dbw%2C%20xlR1C1%2C%20xlA1%2C%20%2C%20ActiveCell.Resize(CellsRange.Rows.Count%2C%20CellsRange.Columns.Count).Cells(CF3%20%2B%201))%0AIf%20Evaluate(dbw)%20%3D%20True%20Then%20CF2%20%3D%20CF2%20%2B%20CFCELL.Value%0ACF3%20%3D%20CF3%20%2B%201%0ANext%20CFCELL%0AElse%0ASumConditionColorCells%20%3D%20%22NO-COLOR%22%0AExit%20Function%0AEnd%20If%0ASumConditionColorCells%20%3D%20CF2%0AEnd%20Function%3C%2FPRE%3E%0A%3CP%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3E%3CSPAN%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20695px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F10046iA96CBF8B933AF92A%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22Capture.PNG%22%20title%3D%22Capture.PNG%22%20%2F%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FPRE%3E%0A%3CP%3E%3CSPAN%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%3E%3CIMG%20%2F%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3Ein%20the%20attached%20example%20file%20you%20can%20see%20that%20from%20A3%3AG16%20cells%20are%20formatted%20using%20Conditional%20Formatting.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EUser%20Defined%20Function%20(UDF)%20is%20placed%20in%20cells%20J2%20%26amp%3B%20J3%20and%20cells%20I2%20and%20I3%20are%20the%20criteria%20color%20used%20as%20reference%20inside%20the%20UDF%20in%20J2%20and%20J3.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EI%20hope%20this%20helps%20you.%20%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3BEdit%3A%20uploaded%20file%20and%20updated%20the%20code%20to%20the%20correct%20one.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-38191%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-38191%22%20slang%3D%22en-US%22%3E%3CP%3EThank%20you%20for%20the%20response%20Mourad.%20%26nbsp%3Bsorry%20i%20didn't%20see%20your%20post%20until%20Wyn%20responded.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20will%20try%20the%20sumifs%20function.%20I%20hadn't%20thought%20about%20burying%20the%20conditional%20formatting%20formula%20in%20the%20sumifs%20formula.%20%26nbsp%3BMaybe%20that%20will%20work.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-38183%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-38183%22%20slang%3D%22en-US%22%3E%3CP%3E%40Deleted's%20suggestion%20of%20an%20extra%20helper%20column%20for%20a%20sumif%20is%20by%20far%20the%20safest%20and%20most%20easily%20understood%20option.%20%26nbsp%3B%20%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-36570%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-36570%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20Matt%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Emay%20be%20using%20the%20%3CA%20href%3D%22https%3A%2F%2Fsupport.office.com%2Fen-us%2Farticle%2FSUMIF-function-169b8c99-c05c-4483-a712-1697a653039b%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3ESUMIF%3C%2FA%3E%20or%20%3CA%20href%3D%22https%3A%2F%2Fsupport.office.com%2Fen-us%2Farticle%2FSUMIFS-function-c9e748f5-7ea7-455d-9406-611cebce642b%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3ESUMIFS%3C%2FA%3E%20functions%20could%20help.%20You%20can%20define%20as%20criteria%20the%20same%20criteria%20you%20defined%20for%20the%20conditional%20formats.%20And%2C%20you%20don't%20need%20macros%20then.%20If%20you%20prefer%20macros%2C%20please%20have%20a%20look%20%3CA%20href%3D%22https%3A%2F%2Fwww.ablebits.com%2Foffice-addins-blog%2F2013%2F12%2F12%2Fcount-sum-by-color-excel%2F%23count-conditional-formatting-color%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Eon%20this%20article%3C%2FA%3E%26nbsp%3Bfrom%20Ablebits.%20There%20is%20a%20section%20for%20adding%20values%20on%20conditional%20formats.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EBest%2C%3C%2FP%3E%3CP%3EMourad%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-418432%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-418432%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F24499%22%20target%3D%22_blank%22%3E%40Jamil%20Mohammad%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CPRE%3E%3CSPAN%3EI%20want%20to%20count%20the%20number%20of%20yellow%20boxes%20as%20in%20the%20file%20below%20and%20output%20in%20the%20column%20%22count%20color%20yellow%22%0AThank%20you%20so%20much!%3C%2FSPAN%3E%3C%2FPRE%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-421856%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-421856%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F24499%22%20target%3D%22_blank%22%3E%40Jamil%20Mohammad%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3EI%20found%20this%20code%20to%20be%20used%20in%20my%20file%20but%20I%20want%20to%20switch%20from%20%22Sub%22%20to%20%22Function%22.%20That%20is%2C%20I%20want%20the%20result%20of%20the%20yellow%20box%20displayed%20in%20the%20column%20count%20color%20yellow.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EHelp%20me!!%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EThank%20you%20very%20much!!%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CDIV%20class%3D%22line%20number1%20index0%20alt2%22%3ESub%20DisplayFormatCount()%3C%2FDIV%3E%3CDIV%20class%3D%22line%20number2%20index1%20alt1%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B'Updateby20150305%3C%2FDIV%3E%3CDIV%20class%3D%22line%20number3%20index2%20alt2%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3BDim%20Rng%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3EAs%20Range%3C%2FDIV%3E%3CDIV%20class%3D%22line%20number4%20index3%20alt1%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3BDim%20CountRange%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3EAs%20Range%3C%2FDIV%3E%3CDIV%20class%3D%22line%20number5%20index4%20alt2%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3BDim%20ColorRange%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3EAs%20Range%3C%2FDIV%3E%3CDIV%20class%3D%22line%20number6%20index5%20alt1%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3BDim%20xBackColor%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3EAs%20Long%3C%2FDIV%3E%3CDIV%20class%3D%22line%20number7%20index6%20alt2%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3BDim%20xFontColor%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3EAs%20Long%3C%2FDIV%3E%3CDIV%20class%3D%22line%20number8%20index7%20alt1%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3BOn%20Error%20Resume%20Next%3C%2FDIV%3E%3CDIV%20class%3D%22line%20number9%20index8%20alt2%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3BxTitleId%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3D%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%22KutoolsforExcel%22%3C%2FDIV%3E%3CDIV%20class%3D%22line%20number10%20index9%20alt1%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3BSet%20CountRange%20%3D%20Application.Selection%3C%2FDIV%3E%3CDIV%20class%3D%22line%20number11%20index10%20alt2%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3BSet%20CountRange%20%3D%20Application.InputBox(%22Count%20Range%20%3A%22%2C%20xTitleId%2C%20CountRange.Address%2C%20Type%3A%20%3D%20%3CLI-EMOJI%20id%3D%22lia_smiling-face-with-sunglasses%22%20title%3D%22%3Asmiling_face_with_sunglasses%3A%22%3E%3C%2FLI-EMOJI%3E%3C%2FDIV%3E%3CDIV%20class%3D%22line%20number12%20index11%20alt1%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3BSet%20ColorRange%20%3D%20Application.InputBox(%22Color%20Range(single%20cell)%3A%22%2C%20xTitleId%2C%20Type%3A%20%3D%20%3CLI-EMOJI%20id%3D%22lia_smiling-face-with-sunglasses%22%20title%3D%22%3Asmiling_face_with_sunglasses%3A%22%3E%3C%2FLI-EMOJI%3E%3C%2FDIV%3E%3CDIV%20class%3D%22line%20number13%20index12%20alt2%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3BSet%20ColorRange%20%3D%20ColorRange.Range(%22A1%22)%3C%2FDIV%3E%3CDIV%20class%3D%22line%20number14%20index13%20alt1%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3BxReturn%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3D%200%3C%2FDIV%3E%3CDIV%20class%3D%22line%20number15%20index14%20alt2%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3BFor%20Each%20Rng%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3EIn%20CountRange%3C%2FDIV%3E%3CDIV%20class%3D%22line%20number16%20index15%20alt1%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3Bqqq%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3D%20Rng.Value%3C%2FDIV%3E%3CDIV%20class%3D%22line%20number17%20index16%20alt2%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3Bxxx%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3D%20Rng.DisplayFormat.Interior.Color%3C%2FDIV%3E%3CDIV%20class%3D%22line%20number18%20index17%20alt1%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3BIf%20Rng.DisplayFormat.Interior.Color%20%3D%20ColorRange.DisplayFormat.Interior.Color%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3EThen%3C%2FDIV%3E%3CDIV%20class%3D%22line%20number19%20index18%20alt2%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3BxBackColor%26nbsp%3B%26nbsp%3B%20%3D%20xBackColor%20%2B%201%3C%2FDIV%3E%3CDIV%20class%3D%22line%20number20%20index19%20alt1%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3BEnd%20If%3C%2FDIV%3E%3CDIV%20class%3D%22line%20number21%20index20%20alt2%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3BIf%20Rng.DisplayFormat.Font.Color%20%3D%20ColorRange.DisplayFormat.Font.Color%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3EThen%3C%2FDIV%3E%3CDIV%20class%3D%22line%20number22%20index21%20alt1%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3BxFontColor%20%3D%20xFontColor%20%2B%201%3C%2FDIV%3E%3CDIV%20class%3D%22line%20number23%20index22%20alt2%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3BEnd%20If%3C%2FDIV%3E%3CDIV%20class%3D%22line%20number24%20index23%20alt1%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3BNext%3C%2FDIV%3E%3CDIV%20class%3D%22line%20number25%20index24%20alt2%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3BMsgBox%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%22BackColor%20is%20%22%20%26amp%3B%20xBackColor%20%26amp%3B%20Chr(10)%20%26amp%3B%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%22FontColor%20is%20%22%20%26amp%3B%20xFontColor%3C%2FDIV%3E%3CDIV%20class%3D%22line%20number26%20index25%20alt1%22%3EEnd%20Sub%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-434407%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-434407%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20Jamil!%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F24499%22%20target%3D%22_blank%22%3E%40Jamil%20Mohammad%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThis%20is%20my%20conditional%20formatt%20rule%20for%20January%2C%20person%201%3A%3C%2FP%3E%3CP%3E(Person%201%2C%20ROW%207)%20%3DAND(C9%3D%22EL%22%2CC9%26lt%3B%26gt%3B%22%22)%20-------%20Applies%20to%20%3D%24C%247%3A%24Y%247%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWhen%20I%20click%20the%20paint%20brush%20and%20paste%20to%20other%20rowns%2C%20the%20formula%20doesnt%20change%2C%20it%20just%20adds%20to%20the%20applies%20to%20box%20like%20the%20below%3A%3C%2FP%3E%3CP%3E(Person%202%2C%20ROW%2011)%20%3DAND(C9%3D%22EL%22%2CC9%26lt%3B%26gt%3B%22%22)%20--------Applies%20to%20%3D%24C%247%3A%24Y%247%2C%20%24C%2411%3A%24Y%2411%3C%2FP%3E%3CP%3E(Person%203%2C%20ROW%2015)%20%3DAND(C9%3D%22EL%22%2CC9%26lt%3B%26gt%3B%22%22)%20------%20Applies%20to%20%3D%24C%247%3A%24Y%247%2C%20%24C%2411%3A%24Y%2411%2C%20%24C%2415%3A%24Y%2415%3C%2FP%3E%3CP%3EAnd%20so%20on...%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20need%20my%20conditional%20formatting%20to%20be%3A%3C%2FP%3E%3CP%3E(Person%202%2C%20ROW%2011)%20%3DAND(C11%3D%22EL%22%2CC11%26lt%3B%26gt%3B%22%22)%20--------Applies%20to%20%3D%24C%2411%3A%24Y%2411%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThis%20is%20my%20formula%20to%20average%20the%20coloured%20green%20cells%20with%20time%20values%3A%3C%2FP%3E%3CP%3E%3DSumConditionColorCells(C7%3AY7%2CJD4)%2FCOUNTConditionColorCells(C7%3AY7%2CJD4)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20already%20completed%201%20full%20row%20for%2012%20months%20for%201%20person%2C%20this%20has%20taken%20me%20all%20night!!%20Are%20you%20able%20to%20advise%20why%20my%20rule%20is%20not%20following%20sequence%20when%20copying%20using%20the%20paintbrush%20as%20per%20the%20video%20you%20posted%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20appreciate%20your%20help%20with%20this%2C%20I%20am%20stuck%20in%20glue%20with%20this%20and%20I%20dont%20fancy%20completeing%20conditional%20formatting%20for%20740%20rows!!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EX%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-446412%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-446412%22%20slang%3D%22en-US%22%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F308372%22%20target%3D%22_blank%22%3E%40yi513%3C%2FA%3E%3CBR%20%2F%3E%3CBR%20%2F%3Eyour%20formula%20to%20evaluate%20a%20condition%20is%20not%20correct.%20you%20cannot%20have%20multiple%20evaluation%20in%20the%20single%20condition.%20for%20example%20%3DIF(N%245%26lt%3B%24L6%2C%20IF(N%245%26gt%3B%3D%24K6%2C%20TRUE%2C%20FALSE)%2C%20FALSE)%20is%20not%20correct.%20try%20to%20see%20how%20you%20can%20first%20put%20correct%20condition%20into%20the%20workbook.%20Also%2C%20please%20read%20my%20earlier%20posts%20on%20the%20limitation%20of%20UDF%20and%20also%20the%20troubleshootings%20of%20other%20users%20with%20similar%20problems.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-446419%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-446419%22%20slang%3D%22en-US%22%3Ehiepkt12%20%3CBR%20%2F%3E%3CBR%20%2F%3Ethis%20is%20not%20the%20sub%20routine%20i%20wrote.%20and%20it%20will%20not%20work%20for%20this%20purpose.%20you%20may%20need%20to%20use%20the%20function%20which%20I%20wrote%20to%20make%20it%20work.%20so%2C%20i%20cannot%20change%20that%20sub%20to%20function%20to%20make%20it%20work.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-446427%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-446427%22%20slang%3D%22en-US%22%3EMrsLSkinner%20%3CBR%20%2F%3E%3CBR%20%2F%3Epaint%20brush%20should%20work.%20can%20you%20upload%20a%20dummy%20sample%20file%3F%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-482963%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-482963%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F24499%22%20target%3D%22_blank%22%3E%40Jamil%20Mohammad%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F24499%22%20target%3D%22_blank%22%3E%40Jamil%20Mohammad%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHi%20Jamil-%3C%2FP%3E%3CP%3EApologies%20in%20advance%20if%20this%20inquiry%26nbsp%3B%20is%20in%20the%20wrong%20place%20or%20if%20you've%20answered%20this%20particular%20question%20before%20but%20I%20am%20having%20an%20issue%20that%20I%20am%20hoping%20you%20can%20help%20with.%20I%20have%20tried%20using%20your%20UDF%20and%20it%20works%2C%20but%20it%20doesn't%20appear%20to%20be%20exactly%20what%20I%20need.%20Currently%2C%20my%20sheet%20is%20set%20up%20in%20a%20way%20that%20if%20any%20cell%20in%20a%20column%20is%20filled%20in%20a%20certain%20range%20then%20another%20cell%20outside%20of%20that%20range%20will%20be%20filled%20with%20a%20color.%20I%20would%20like%20to%20count%20the%20cell%20that%20is%20filled%2C%20not%20the%20cell%20that%20has%20the%20info%20inputted.%20Does%20that%20make%20sense%3F%20I've%20attached%20my%20spreadsheet.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EYou%20have%20been%20so%20helpful%20with%20everyone%20on%20this%20thread%20and%20I%20hope%20you%20can%20assist%20me%20as%20well.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-483047%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-483047%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F327649%22%20target%3D%22_blank%22%3E%40cp411%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EHi%20cp411%2C%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThanks%20for%20your%20kind%20words.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EI%20looked%20at%20your%20file.%26nbsp%3B%20You%20do%20not%20need%20to%20overkill%20it%20with%20UDF%20and%20too%20many%20repetitive%20conditional%20formatting%20rules.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EYou%20just%20need%20a%20simple%20formula%20like%20this%20one%2C%20I%20wrote%20for%20you.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EFirst%2C%20I%20deleted%20all%20of%20the%20conditional%20formatting%20rules%20that%20had%20the%20pattern%20style%20in%20the%20range%20area%20C3%3AND16.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThen%20I%20placed%20one%20single%20formula%26nbsp%3B%3DIF(COUNTA(OFFSET(INDEX(C%2418%3AC%24114%2CMATCH(%24A3%2C%24A%2418%3A%24A%24114%2C0))%2C1%2C0%2C5%2C1))%26gt%3B0%2C1%2C0)%3C%2FP%3E%0A%3CP%3Eand%20copied%20down%20and%20right%20in%20all%20range%20up%20to%26nbsp%3BC3%3AND16.%26nbsp%3B%20%26nbsp%3B%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3Ethen%2C%20I%20selected%20area%26nbsp%3BC3%3AND16%26nbsp%3B%20and%20right%20clicked%26nbsp%3B%20and%20then%20clicked%20on%20%22Format%20cells%22%20and%20then%20%22custom%20format%22%20then%20used%20three%20semicolons%20as%20the%20custom%20format%26nbsp%3B%20like%20this%20%3B%3B%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3Eclick%20ok%20and%20it%20has%20hidden%20the%20content%20of%20the%20cells%20from%20visibility.%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3Ethen%20I%20selected%26nbsp%3BC3%3AND16%20range%20and%20created%20one%20single%20Conditional%20formatting%20rule%26nbsp%3B%3DC3%3D1%20and%20selected%20fill%20pattern%20style%20and%20clicked%20ok.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ESaved%20it.%26nbsp%3B%20%26nbsp%3Band%20uploaded%20it%20also%20here.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3Eyou%20will%20see%20that%20this%20solution%20is%20much%20more%20simplified%20and%20robust.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3Eplease%20see%20attached%20workbook.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-483277%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-483277%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F24499%22%20target%3D%22_blank%22%3E%40Jamil%20Mohammad%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you%20so%20much%20for%20your%20quick%20reply!%20I've%20reviewed%20the%20file%20but%20I%20still%20have%20one%20question.%20How%20can%20I%20count%20all%20the%20filled%20cells%20in%20a%20row%20and%20tally%20them%20in%20the%20%22Total%20Days%22%20column%3F%20For%20example%2C%20in%20row%203%2C%20I'd%20like%20to%20keep%20a%20running%20total%20under%20%22Total%20Days%22%20of%20all%20the%20filled%20cells%20in%20that%20row.%20Is%20there%20a%20way%20to%20do%20that%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-483511%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-483511%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F327649%22%20target%3D%22_blank%22%3E%40cp411%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3Eyou%20can%20simply%20use%26nbsp%3B%3DCOUNTIF(%24C3%3A%24ND3%2C1)%26nbsp%3B%20in%20B3%20and%20copy%20down.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EPlease%20see%20attached.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EI%20also%20removed%20the%20UDFs%20from%20your%20file%20and%20saved%20it%20as%20normal%20xlsx%20file.%20as%20you%20no%20longer%20need%20to%20xlsm%20format.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-487070%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-487070%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F24499%22%20target%3D%22_blank%22%3E%40Jamil%20Mohammad%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you!%20That%20worked%20great!%20I%20have%20one%20more%20question%20and%20hopefully%20I'll%20be%20set.%20I've%20tried%20changing%20the%20name%20of%20Project%201%2C%20Project%202%2C%20etc.%2C%20but%20when%20I%20do%20the%20entire%20corresponding%20row%20is%20filled%20with%20the%20color.%20How%20can%20I%20change%20the%20text%20in%20column%20A%20without%20the%20row%20filling%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-487117%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-487117%22%20slang%3D%22en-US%22%3EActually%20figured%20it%20out!%20I%20have%20to%20have%20the%20cell%20in%20the%20first%20list%20match%20the%20header%20in%20the%20block%20of%20other%20cells.%20Thank%20you%20so%20much%20for%20your%20help!!%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-500307%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-500307%22%20slang%3D%22en-US%22%3Eyou%20are%20welcome%20cp411.%3CBR%20%2F%3E%3CBR%20%2F%3Ethanks%20for%20your%20feedback.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-536619%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-536619%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F24499%22%20target%3D%22_blank%22%3E%40Jamil%20Mohammad%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Eyou%20look%20like%20the%20man.%20I'm%20trying%20to%20do%20something%20simular%20to%20what%20you%20have%20done%20here.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20want%20the%20hyperlinked%20cells%20on%20the%20overview%20sheet%20to%20turn%20red%20if%20any%20cell%20on%20any%20of%20the%20hyperlinked%20sheet%20is%20red%2C%20and%20green%20if%20there%20isn't%20a%20red%20cell.%20there%20is%20a%20lot%20of%20conditional%20formatting%20going%20of%20for%20the%20cells%20so%20hard%20to%20to%20duplicate%20into%20the%20one%20cell.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20tried%20GetColor%20on%20the%20the%20sheet%20but%20just%20cant%20get%20it%20to%20get%20a%20response%2C%20I%20have%20got%20the%20Bankhead%20hyperlink%20cell%20on%20Farm%20overview%20(sheet%201)%20to%20turn%20red%20by%20Bankhead%20(sheet%206)%20cell%20AP4%20with%20conditional%20formatting%2C%20but%20just%20need%20a%20formula%20to%20get%20a%20response%20from%20the%20above%20criteria%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20now%20tried%20adding%20this%20VBA%20but%20that%20isn't%20working%20either%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Enot%20sure%20if%20there%20is%20an%20easier%20way%20or%20some%20part%20of%20the%20code%20is%20wrong%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-538541%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-538541%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F333505%22%20target%3D%22_blank%22%3E%40Ade_Salmon%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThanks%20for%20your%20kind%20words.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EI%20looked%20briefly%20at%20your%20file.%20Found%20couple%20of%20issues.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EA)%20your%20conditional%20formatting%20are%20not%20consistent.%20For%20example%20Worksheet%20BankHead%20column%20O%20has%204%20rules%20in%20conditional%20formatting.%20then%20your%20column%20Q%20only%20has%201%20rule%20and%20column%20R%20has%203%20rules.%26nbsp%3B%20so%2C%20there%20is%20no%20clear%20pattern%20for%20a%20formula%20to%20determine%20the%20count.%26nbsp%3B%20If%20your%20columns%20CF%20were%20having%20the%20same%20pattern%20of%20rules%2C%20then%20we%20could%20have%20used%20a%20simple%20formula%20in%20a%20helper%20cell%20for%20your%20overview%20sheet%20to%20turn%20red%20if%20any%20of%20those%20columns%20cells%20condition%20were%20met.%20For%20example%20this%20formula%26nbsp%3B%3DSUMPRODUCT(--(C3%3AAL3%3CC1%3E%0A%3C%2FC1%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EB)%20you%20have%20used%20two%20many%20unnecessary%20If%20functions%20with%20ISblank%20function%20to%20evaluate%20if%20the%20cells%20are%20not%20empty.%20This%20has%20caused%20your%20workbook%20to%20become%20sluggish.%20instead%20of%26nbsp%3B%3DIF(ISBLANK(A5)%2C%22%22%26nbsp%3B%20%26nbsp%3Byou%20could%20first%20evaluate%20that%20If%20cell%20is%20not%20empty%20then%20do%20that%20without%20the%20use%20of%20ISBLANK%20function.%20The%20way%20it%20is%20now%2C%20it%20first%20evaulates%20every%20cell%20if%20it%20blank%20or%20not.%26nbsp%3B%20so%2C%20you%20could%20use%20something%20like%26nbsp%3B%3DIF(A5%26lt%3B%26gt%3B%22%22%2C%24A5-7*4%2C%22%22).%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EC)%20TODAY%20functun%20is%20volatile%2C%20using%20it%20multiple%20time%20in%20everysheet%20is%20slowing%20down%20your%20workbook.%3C%2FP%3E%0A%3CP%3Einstead%20you%20can%20have%20one%20single%20cell%20with%20TODAY%20function%20and%20all%20other%20formulas%20are%20referenced%20to%20this%20single%20cell.%20in%20fact%20you%20could%20have%20one%20single%20named%20range%20with%20%3DTODAY()%20function%20and%20it%20is%20used%20in%20your%20formulas%20across%20the%20sheets.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ED)%20you%20have%20pre-populated%20500%20rows%20in%20each%20of%20the%20sheets%20with%20the%20unnecessary%20formulas.%20I%20understand%20that%20you%20need%20to%20have%20those%20formulas%20in%20case%20if%20the%20data%20grows%2C%20however%20you%20can%20avoid%20those%20500%20cells%20with%20pre%20populated%20formula%20by%20using%20Excel%20Tables%20feature%2C%20which%20has%20dynamic%20nature%20that%20when%20you%20add%20new%20data%20all%20formulas%20from%20the%20above%20cells%20are%20automatically%20copied%20down.%20so%20your%20workbook%20will%20work%20much%20faster%20and%20more%20dynamic%20with%20Excel%20Tables%20rather%20than%20these%203500%20rows%20with%20formulas%20which%20sucks%20the%20CPU.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EHope%20it%20helps.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-540285%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-540285%22%20slang%3D%22en-US%22%3EJamil%3CBR%20%2F%3E%3CBR%20%2F%3Ethat%20is%20brilliant%20I%20am%20only%20an%20amateur%20at%20this%20piecing%20together%20the%20bit%20of%20knowledge%20I%20know%20to%20make%20this%20for%20my%20wife%2C%20not%20used%20tables%20before%20but%20I%20will%20look%20into%20correcting%20the%20spreadsheet%20with%20you%20recommendations%3CBR%20%2F%3E%3CBR%20%2F%3Ethanks%20a%20lot%3CBR%20%2F%3E%3CBR%20%2F%3EAde%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-540852%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-540852%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F24499%22%20target%3D%22_blank%22%3E%40Jamil%20Mohammad%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHi%20Jamil%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20cleaned%20up%20the%20formula's%20and%20they%20work%20a%20treat%20thanks.%20Column%20B%26nbsp%3B%20I%20couldn't%20do%20without%20the%20ISBLANK%20it%20just%20returns%20%22FALSE%22%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI'm%20struggling%20with%20creating%20it%20into%20a%20table%20as%20you%20say%20to%20auto%20populate%20the%20formatting%20for%20each%20column%20to%20alleviate%20having%20500%20pre%20poulated%20rows%3F%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20reduced%20the%20CF%20to%20what%20is%20required%20column%20A%20and%20Q%20require%20no%20formatting%20as%20they%20are%20user%20inputs%20%22dates%22%20that%20everything%20after%20them%20respond%20to%2C%20all%20the%20rest%20have%20the%20same%20CF%20including%20column%20R%20but%20the%20orange%20CF%20is%20not%20required%20as%20it%20is%20directly%20influenced%20by%20column%20Q%20which%20will%20be%20inputted%20on%20the%20day%3F%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Eand%20then%20that%20leaves%20changing%20the%20overview%20cell%20to%20change%20colour%20when%20any%20of%20the%20cells%20in%20the%20other%20sheet%20are%20red.%20As%20all%20the%20columns%20except%20A%20and%20Q%20are%20now%20the%20same%20CF%20will%20it%20be%20easier%20to%20make%20it%20a%20true%20false%20so%20if%20there%20isn't%20a%20red%20cell%20it%20will%20be%20green%20and%20if%20there%20is%20it%20will%20be%20red%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-543777%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-543777%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F24499%22%20target%3D%22_blank%22%3E%40Jamil%20Mohammad%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EGreat%20advice%20Jamil%2C%20All%20working%20great%20and%20reduced%20the%20spreadsheet%20down%20to%2050KB%20rather%20than%20Mega's.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Estill%20can't%20get%20it%20to%20change%20the%20overview%20cell's%20colors%20though%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-547946%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-547946%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F24499%22%20target%3D%22_blank%22%3E%40Jamil%20Mohammad%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EGreat%20work%20Jamil%20all%20done%20reduced%20the%20spreadsheet%20to%20100Kb%20rather%20than%20MB's%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20removed%20the%20middle%20column%20so%20only%20the%20first%20column%20now%20is%20different%20from%20the%20rest%20but%20I%20still%20cant%20get%20the%20overview%20hyperlink%20cells%20to%20turn%20red%20or%20green%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ehelp%20would%20be%20greatly%20appreciated.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-548016%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-548016%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F24499%22%20target%3D%22_blank%22%3E%40Jamil%20Mohammad%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EGreat%20work%20Jamil%20all%20done%20reduced%20the%20spreadsheet%20to%20100Kb%20rather%20than%20MB's%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20removed%20the%20middle%20column%20so%20only%20the%20first%20column%20now%20is%20different%20from%20the%20rest%3C%2FP%3E%3CP%3Echanged%20all%20formular's%20as%20you%20suggested%2C%3C%2FP%3E%3CP%3Ereduced%20down%20to%201%20TODAY()%20cell%2C%3C%2FP%3E%3CP%3Einserted%20a%20table%20so%20auto%20populating%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ebut%20I%20still%20cant%20get%20the%20overview%20hyperlink%20cells%20to%20turn%20red%20or%20green%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ehelp%20would%20be%20greatly%20appreciated.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-548828%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-548828%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F24499%22%20target%3D%22_blank%22%3E%40Jamil%20Mohammad%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHi%20Jamil%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Edone%20everything%20you%20suggested%2C%20it%20has%20worked%20a%20treat%20but%20still%20cant%20get%20the%20overview%20cells%20to%20change%20to%20red%20or%20green%20from%20their%20relevant%20sheet%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ehope%20for%20some%20assistance%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-552159%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-552159%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F333505%22%20target%3D%22_blank%22%3E%40Ade_Salmon%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EGreat!%26nbsp%3B%20now%20only%20little%20has%20remained.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EPlease%20see%20attached%20workbook.%20I%20have%20placed%20a%20formula%20next%20to%20the%20Bankhead%20icon%20in%20cell%20A5%20of%20Overview%20sheet.%26nbsp%3B%20%26nbsp%3Bthis%20is%20the%20formula%26nbsp%3B%3DSUMPRODUCT(--(Bankhead!C3%3AAL3%3CBANKHEAD%3E%0A%3C%2FBANKHEAD%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3Ethen%20I%20used%20custom%20formatting%20and%20in%20custom%20formatting%20I%20put%20%3B%3B%3B%20three%20semicolons%2C%20so%20that%20the%20value%20returned%20is%20not%20visible.%20Then%20I%20created%20a%20conditional%20formatting%20on%20cell%20B5%20that%20If%20cell%20A5%20is%20greater%20than%20zero%20then%20turn%20red.%26nbsp%3B%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EYou%20can%20replicate%20this%20with%20the%20other%20worksheet%20icons%20as%20well.%3C%2FP%3E%0A%3CP%3E%3CBR%20%2F%3EHope%20it%20helps.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-555088%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-555088%22%20slang%3D%22en-US%22%3EJamil%3CBR%20%2F%3E%3CBR%20%2F%3Eworks%20a%20treat%2C%20you%20are%20a%20wizard%3CBR%20%2F%3E%3CBR%20%2F%3Ethanks%20a%20lot%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-651530%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-651530%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F24499%22%20target%3D%22_blank%22%3E%40Jamil%20Mohammad%3C%2FA%3E%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI've%20study%20this%20thread%20for%20few%20days%20already...%20I%20have%20a%20problem%20that%20I%20want%20to%20solve%2C%20in%20my%20example%20I%20was%20playing%20with%20a%20personal%20project%2C%20and%20basically%20what%20I%20want%20to%20do%20is%20after%20using%20conditional%20formatting%2C%20I'm%20using%20a%20match%20function%2C%20I'm%20highlighting%20a%20few%20numbers%2C%20what%20I%20want%20to%20finally%20obtain%20is%20the%20COUNT%20of%20each%20matching%20numbers%20on%20each%20row...%20what%20I%20have%20done%20is%20a%20double%20filtration%20based%20on%20a%20combo%20box%20which%20then%20print%20diferent%20lists%20and%20then%20match%20numbers%20based%20on%20CF.%3C%2FP%3E%3CP%3EI%20like%20to%20say%20about%20myself%20that%20I'm%20proficient%20in%20using%20Excel%2C%20but%20I'm%20kinda%20stuck%20on%20this%20problem!%3C%2FP%3E%3CP%3EI%20did%20try%20diferent%20approaches%20and%20examples%20that%20I%20found%20on%20this%20thread%2C%20but%20still%20didn't%20find%20the%20correct%20combination....%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-651622%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-651622%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F349896%22%20target%3D%22_blank%22%3E%40Cristian1980%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EYou%20can%20use%20SUMPRODUCT%20with%20COUNTIFS.%26nbsp%3B%20COUNTIFS%20criteria%20can%20do%20function%20argument%20array%20operation%20when%20we%20place%20a%20range%20instead%20of%20single%20criteria%20and%20then%20we%20wrap%20it%20with%20SUMPRODUCT%20to%20eliminate%20the%20need%20of%20special%20keystroke.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EI%20placed%26nbsp%3B%3DSUMPRODUCT(COUNTIFS(D3%3AO3%2C%24D%241%3A%24I%241))%20in%20P3%20and%20copied%20down.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3Eplease%20see%20attached%20file%20with%20formula.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-652077%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-652077%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F24499%22%20target%3D%22_blank%22%3E%40Jamil%20Mohammad%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThx!%20for%20the%20idea%2C%20I%20was%20kinda%20fixed%20on%20the%20counting%20using%20scripting%2C%20because%20the%20usual%20COUNTIFS%20from%20excel%20didn't%20give%20to%20much%20initially%2C%20now%20I%20understand%20that%20it%20did%20requiter%20an%20other%20combination%3B%20now%20I%20can%20continue%20my%20project.%20Thx!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-652089%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-652089%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F349896%22%20target%3D%22_blank%22%3E%40Cristian1980%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EYou%20are%20welcome.%26nbsp%3B%20Thanks%20for%20feedback.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-715838%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-715838%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F24499%22%20target%3D%22_blank%22%3E%40Jamil%20Mohammad%3C%2FA%3E%26nbsp%3B%3CBR%20%2F%3E%3CBR%20%2F%3EThank%20you%20for%20this%2C%20i%20have%20been%20trying%20to%20trouble%20shoot%20my%20issues%20for%20the%20past%20week%20or%20so%20to%20no%20avail.%20The%20problem%20is%20I%20need%20to%20use%20quite%20a%20few%20different%20colors%20for%20conditional%20formatting.%20I%20have%20made%20sure%20that%20all%20the%20colors%20match%20in%20terms%20of%20RGB%20between%20the%20painted%20cells%20and%20the%20conditional%20cells.%20But%20after%20the%20first%209%20(the%209%2F10%20standard%20pallet%20colors)%20the%20math%20doesn't%20seem%20to%20be%20accurate%20any%20longer.%20Is%20there%20anyway%20you%20can%20take%20a%20look%20at%20my%20file%20and%20see%20if%20there%20is%20anything%20I%20can%20do%20to%20fix%20this%20or%20if%20you%20have%20any%20advice%20on%20this%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-719612%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-719612%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F365309%22%20target%3D%22_blank%22%3E%40Mitchell_Wade%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EHi%2C%26nbsp%3B%20perhaps%20you%20may%20have%20not%20read%20my%20earlier%20posts%20to%20similar%20issues.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EYour%20conditional%20formatting%20range%20in%20the%20CF%20and%20inside%20UDF%20were%20not%20matching.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EI%20change%20your%20CF%20applied%20ranges%20in%20a%20way%20to%20match%20the%20UDF%20and%20now%20it%20works%2C%20see%20attached.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-723097%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-723097%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F24499%22%20target%3D%22_blank%22%3E%40Jamil%20Mohammad%3C%2FA%3E%26nbsp%3B%3CBR%20%2F%3E%3CBR%20%2F%3EThanks%20for%20taking%20a%20look%20at%20it%2C%20but%20I%20am%20still%20seeing%20the%20errors%20even%20in%20the%20preview%20version%20you%20sent.%20The%20times%20in%20Column%20D%20do%20not%20sum%20to%20their%20corresponding%20colors%20in%20column%20H%20and%20Column%20M.%20This%20is%20the%20issue%20I%20am%20speak%20of.%20for%20example.%20if%20you%20look%20at%20D4%20and%20H4%20they%20are%20not%20the%20same%20at%20all.%20D4%20is%20calculated%20to%20be%2020%20mins%20while%20H4%20is%20only%20calculating%207%20minutes.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-732920%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-732920%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F365309%22%20target%3D%22_blank%22%3E%40Mitchell_Wade%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3Eit%20worked%20and%20i%20tested%20it.%26nbsp%3B%20try%20to%20remove%20the%20time%20format%20and%20change%20it%20to%20just%20normal%20general%20number%20format.%26nbsp%3B%20then%20add%20another%20acitivty%20in%20column%20A%20for%20example%2015)%20and%20then%20add%20a%20value%20in%20column%20D%20and%20then%20it%20will%20see%20that%20UDF%20adds%20up%20that%20amount%20into%20corresponding%20color%20of%20the%26nbsp%3B%2015)%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-776057%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-776057%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F24499%22%20target%3D%22_blank%22%3E%40Jamil%20Mohammad%3C%2FA%3E%2C%20the%20sample%20file%20uploaded%20is%20still%20showing%20%23Value%20error%20message.%3C%2FP%3E%3CP%3EI%20am%20getting%20a%20ZERO%20result%20when%20applied.%3C%2FP%3E%3CP%3EI%20have%20copied%20the%20CountConditionColorCells%20UDF%20and%20have%20conditional%20formatting%20on%20a%20row%2C%20which%20I%20am%20trying%20to%20count.%3C%2FP%3E%3CP%3EI%20am%20also%20using%20this%20in%20cell%20A6%3A%20%26nbsp%3B%3DCountConditionColorCells(C6%3AV6%2CA6)%3C%2FP%3E%3CP%3ERow%20C%20is%20the%20conditional%20formatting%20row.%20The%20CF%20is%20working%20correctly%2C%20but%20the%20UDF%20is%20not%20co-operating.%3C%2FP%3E%3CP%3EAny%20ideas%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThis%20is%20the%20EDF%20I%20have%20copied%3A%3C%2FP%3E%3CP%3EFunction%20CountConditionColorCells(CellsRange%20As%20Range%2C%20ColorRng%20As%20Range)%3CBR%20%2F%3EDim%20Bambo%20As%20Boolean%3CBR%20%2F%3EDim%20dbw%20As%20String%3CBR%20%2F%3EDim%20CFCELL%20As%20Range%3CBR%20%2F%3EDim%20CF1%20As%20Single%3CBR%20%2F%3EDim%20CF2%20As%20Double%3CBR%20%2F%3EDim%20CF3%20As%20Long%3CBR%20%2F%3EBambo%20%3D%20False%3CBR%20%2F%3EFor%20CF1%20%3D%201%20To%20CellsRange.FormatConditions.Count%3CBR%20%2F%3EIf%20CellsRange.FormatConditions(CF1).Interior.ColorIndex%20%3D%20ColorRng.Interior.ColorIndex%20Then%3CBR%20%2F%3EBambo%20%3D%20True%3CBR%20%2F%3EExit%20For%3CBR%20%2F%3EEnd%20If%3CBR%20%2F%3ENext%20CF1%3CBR%20%2F%3ECF2%20%3D%200%3CBR%20%2F%3ECF3%20%3D%200%3CBR%20%2F%3EIf%20Bambo%20%3D%20True%20Then%3CBR%20%2F%3EFor%20Each%20CFCELL%20In%20CellsRange%3CBR%20%2F%3Edbw%20%3D%20CFCELL.FormatConditions(CF1).Formula1%3CBR%20%2F%3Edbw%20%3D%20Application.ConvertFormula(dbw%2C%20xlA1%2C%20xlR1C1)%3CBR%20%2F%3Edbw%20%3D%20Application.ConvertFormula(dbw%2C%20xlR1C1%2C%20xlA1%2C%20%2C%20ActiveCell.Resize(CellsRange.Rows.Count%2C%20CellsRange.Columns.Count).Cells(CF3%20%2B%201))%3CBR%20%2F%3EIf%20Evaluate(dbw)%20%3D%20True%20Then%20CF2%20%3D%20CF2%20%2B%20CFCELL.Value%3CBR%20%2F%3ECF3%20%3D%20CF3%20%2B%201%3CBR%20%2F%3ENext%20CFCELL%3CBR%20%2F%3EElse%3CBR%20%2F%3ESumConditionColorCells%20%3D%20%22NO-COLOR%22%3CBR%20%2F%3EExit%20Function%3CBR%20%2F%3EEnd%20If%3CBR%20%2F%3ESumConditionColorCells%20%3D%20CF2%3CBR%20%2F%3EEnd%20Function%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20would%20appreciate%20any%20help%20you%20can%20provide.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%2C%3C%2FP%3E%3CP%3EVan%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-776519%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-776519%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F24499%22%20target%3D%22_blank%22%3E%40Jamil%20Mohammad%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EDear%20Sir%2C%20i%20have%20been%20trying%20to%20count%20the%20number%20of%20cells%20having%20two%20separate%20conditional%20formatted%20colours%20in%20a%20leave%20planer%20calendar.%20However%20after%20applying%20the%20VBA%20code%20that%20have%20been%20given%20by%20you%20i%20am%20getting%20the%20result%20as%20only%201%20in%20my%20target%20cell.%20i%20have%20atfached%20the%20file%2C%20hoping%20for%20your%20help%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-776520%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-776520%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F24499%22%20target%3D%22_blank%22%3E%40Jamil%20Mohammad%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EDear%20Sir%2C%20i%20have%20been%20trying%20to%20count%20the%20number%20of%20cells%20having%20two%20separate%20conditional%20formatted%20colours%20in%20a%20leave%20planer%20calendar.%20However%20after%20applying%20the%20VBA%20code%20that%20have%20been%20given%20by%20you%20i%20am%20getting%20the%20result%20as%20only%201%20in%20my%20target%20cell.%20i%20have%20atfached%20the%20file%2C%20hoping%20for%20your%20help%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-777789%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-777789%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F383339%22%20target%3D%22_blank%22%3E%40santoshmahapatra%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20range%20you%20used%20in%20your%20UDF%20and%20the%20the%20range%20of%20conditional%20formatted%20cells%20are%20not%20matching%2C%20that%20is%20why%20it%20do%20not%20work.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Eplease%20read%20my%20earlier%20post%20for%20other%20users%20with%20similar%20issues.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-777795%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-777795%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F383043%22%20target%3D%22_blank%22%3E%40_-VAN-_%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Eit%20is%20difficult%20to%20tell%20what%20could%20cause%20the%20return%20of%20zero.%20If%20you%20upload%20a%20dummy%20sample%2C%20I%20can%20look.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-797540%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-797540%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F24499%22%20target%3D%22_blank%22%3E%40Jamil%20Mohammad%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHello%20Mr.%20Mohammad%2C%3C%2FP%3E%3CP%3EThank%20you%20for%20sharing%20your%20expertise%20about%20VBA%20Code%20using%20Conditional%20Formatting.%20I%20am%20not%20knowledgeable%20about%20the%20VBA%20Codes%20and%20Conditional%20Formatting%20Statements.%20Sir%2C%20I%20have%20made%20this%20worksheet%20after%20searching%20for%20VBA%20Codes%20online%20and%20applying%20them%20as%20per%20my%20requirements.%26nbsp%3B%20I%26nbsp%3B%20make%20a%20rather%20large%20worksheet%20(Range%20A1%20%3A%20AK3000)%20every%20month%20wherein%20lot%20of%20calculations%20are%20there%20in%20Column%20Range%20J1%3AAJ3000.%20I%20have%20used%20colors%20for%20fonts%20in%20some%20cells%20and%20then%20used%20VBA%20code%20%22SumByColor%22%20(%3CSTRONG%3E%3CEM%3EYou%20can%20see%20the%20VBA%20Code%20in%20Module%204)%3C%2FEM%3E%3C%2FSTRONG%3E%20to%20get%20the%20totals%20in%20the%20relevant%20cells%20at%20the%20end%20of%20the%20sheet.%20Sir%20I%20am%20attaching%20.xlsb%20sample%20file%20named%20%22%3CSTRONG%3EMaster%20Worksheet%3C%2FSTRONG%3E%22%20for%20your%20reference.%20%3CSTRONG%3EI%20need%20help%20regarding%20Conditional%20Formatting%20and%20then%20using%20VBA%20Code%20for%20summing%20up%20the%20cells%20based%20on%20font%20colors.%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3BMy%20reference%20in%20the%20worksheet%20here%20is%20specially%20for%20cells%20%3CEM%3EU2%2C%20V2%2C%20W2%2C%20X2%3C%2FEM%3E%20and%20then%20with%20reference%20to%20these%20cells%20for%20cells%20%3CEM%3EAG3%2C%20AH3%20and%20AI3%3C%2FEM%3E.%20Currently%20the%20sum%20of%20cell%20range%20W2%3AW17%20is%20done%20by%20%22SumByColor%22%20VBA%20Code.%3C%2FP%3E%3CP%3EThe%20color%20of%20cells%20%3CEM%3EW2%2C%20W4%2C%20W6%2C%20W12%20and%20W15%3C%2FEM%3E%20is%20based%20upon%20the%20value%20of%20Tax%20Percentage%20in%20cells%20%3CEM%3EX2%2C%20X4%2C%20X6%2C%20X12%20and%20X15%20-for%20which%20I%20am%20using%20an%20IF%20Statement%20(%3DIF(V2%26lt%3B%3D2499.49%2C%2212%25%22%2C%2218%25%22)%2C%3C%2FEM%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3CEM%3EThe%20value%20of%20X2%20changes%20to%2012%25%20if%20the%20room%20tariff%20is%3A%3C%2FEM%3E%3C%2FP%3E%3CUL%3E%3CLI%3ELess%20than%20or%20equal%20to%202499.49%20%3A%2012%20%25%3C%2FLI%3E%3C%2FUL%3E%3CP%3EThe%20value%20of%20X2%20changes%20to%2018%25%20if%20the%20room%20tariff%20is%3A%3C%2FP%3E%3CUL%3E%3CLI%3EGreater%20than%20or%20equal%20to%202499.5%3A%2018%20%25%3C%2FLI%3E%3C%2FUL%3E%3CP%3EAt%20present%20I%20am%20changing%20the%20color%20of%20the%20cells%20manually%20which%20is%20becoming%20a%20very%20tedious%20task.%20I%20have%20set%20the%20basic%20font%20color%20of%20all%20the%20cells%26nbsp%3BW2%2C%20W4%2C%20W6%2C%20W12%20and%20W15%20as%20%E2%80%9C%3CFONT%20color%3D%22%230000FF%22%3E%3CSTRONG%3EBlue%3C%2FSTRONG%3E%3C%2FFONT%3E%E2%80%9D%20and%20then%20if%20the%20value%20of%20cell%20X2%20is%2012%25%2C%20I%20manually%20set%20the%20font%20color%20of%20cell%20W2%20to%20%3CFONT%20color%3D%22%23FF0000%22%3E%3CSTRONG%3ERed%3C%2FSTRONG%3E%3C%2FFONT%3E.%3C%2FP%3E%3CP%3EThe%20total%20of%20cell%20range%20W2%3AW17%20gives%20the%20result%20in%20cell%20H18%20%3CSTRONG%3E(Total%20Basic%20Amount%20Room%20Revenue%20(Base%20Tariff%20for%2012%25%20GST)%20%3C%2FSTRONG%3E%26nbsp%3Bfor%20all%20the%20cells%20with%20%3CFONT%20color%3D%22%23FF0000%22%3E%3CSTRONG%3ERed%20Color%20Font%3C%2FSTRONG%3E%3C%2FFONT%3E%20and%20The%20total%20of%20cell%20range%20W2%3AW17%20gives%20the%20result%20in%20cell%20H21%20for%20all%20the%20cells%20with%20%3CFONT%20color%3D%22%230000FF%22%3E%3CSTRONG%3EBlue%20Color%20Font%3C%2FSTRONG%3E%3C%2FFONT%3E%3CSTRONG%3E%20(Total%20Basic%20Amount%20Room%20Revenue%20(Base%20Tariff%20for%2018%25%20GST).%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3E%26nbsp%3B%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3ESir%2C%20I%20tried%20using%20conditional%20formatting%20to%20do%20the%20above%20as%20you%20have%20explained%20with%20examples%2C%20but%20when%20I%20use%20the%20%E2%80%9CSumConditionColorCells%E2%80%9D%20all%20I%20am%20getting%20is%20%23NAME%3F%20or%20NO%20COLOR.%20Sir%20please%20tell%20me%20how%20to%20do%20it%20correctly%20so%20that%20I%20can%20get%20the%20sum%20of%20all%20the%20cells%20with%20%3CSTRONG%3ERed%20Color%20Font%3C%2FSTRONG%3E%20in%20respective%20cell%20and%20also%20the%20sum%20of%20all%20the%20cells%20with%20%3CSTRONG%3EBlue%20Color%20Font%20%3C%2FSTRONG%3Ein%20the%20respective%20cell.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESimilarly%2C%20the%20color%20of%20cells%20AG3%2C%20AH3%20and%20AI3%20is%20dependent%20on%20the%20value%20of%20cells%20X2%20and%20the%20color%20of%20cells%20AG4%2C%20AH4%20and%20AI4%20is%20dependent%20on%20the%20value%20of%20cell%20X4.%20Kindly%20help%20me%20with%20the%20conditional%20formatting%20formula%20and%20the%20respective%20VBA%20code%20for%20these%20cells%20too.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20font%20color%20of%20cells%20AG3%20and%20AH3%20changes%20to%20%3CSTRONG%3ERed%2C%20Accent%202%2C%20Darker%2050%25%20%3C%2FSTRONG%3Eif%20the%20value%20of%20X2%20is%2012%25%20and%20the%20font%20color%20of%20AG3%20and%20AH3%20changes%20to%20%3CSTRONG%3ERed%20%3C%2FSTRONG%3Eif%20the%20value%20of%20X2%20is%2012%25.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20color%20of%20cells%20AG3%20and%20AH3%20changes%20to%20%3CSTRONG%3E%E2%80%9CRGB(217%2C151%2C149)%E2%80%9D%20%3C%2FSTRONG%3Eif%20the%20value%20of%20X2%20is%2018%25%20and%20the%20color%20of%20cells%20AG3%20and%20AH3%20changes%20to%20%3CSTRONG%3EBlue%20Color%20Font%20%3C%2FSTRONG%3Eif%20the%20value%20of%20X2%20is%2018%25.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20sum%20total%20of%20Cell%20AG2%3AAG17%20goes%20to%20output%20cell%20%E2%80%9CH32%E2%80%9D%20if%20the%20value%20is%20for%2018%25%20Tax%20(%3CSTRONG%3EBlue)%3C%2FSTRONG%3E%20and%20goes%20to%20output%20cell%E2%80%9DH34%E2%80%9D%20if%20the%20value%20is%20for%2012%25%20Tax%20%3CSTRONG%3E(Red)%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20sum%20total%20of%20Cell%20AH2%3AAH17%20goes%20to%20output%20cell%20%E2%80%9CH33%E2%80%9D%20if%20the%20value%20is%20for%2018%25%20Tax%20(%3CSTRONG%3EBlue)%3C%2FSTRONG%3E%20%26nbsp%3Band%20goes%20to%20output%20cell%E2%80%9DH35%E2%80%9D%20if%20the%20value%20is%20for%2012%25%20Tax%20%3CSTRONG%3E(Red)%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3E%26nbsp%3B%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3EThe%20sum%20total%20of%20Cell%20AI2%3AAI17%20goes%20to%20output%20cell%20%E2%80%9CH36%E2%80%9D%20if%20the%20value%20is%20for%2018%25%20Tax%20(%3CSTRONG%3EBlue)%3C%2FSTRONG%3E%20%26nbsp%3Band%20goes%20to%20output%20cell%E2%80%9DH37%E2%80%9D%20if%20the%20value%20is%20for%2012%25%20Tax%20%3CSTRONG%3E(Red)%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3E%26nbsp%3B%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3ESir%20I%20hope%20you%20have%20understood%20my%20problem%20and%20you%20shall%20help%20me%20by%20giving%20me%20the%20conditional%20formatting%20formulae%20for%20the%20cells%20and%20as%20well%20as%20a%20VBA%20Code%20to%20execute%20the%20command.%20Thanking%20you%20in%20anticipation.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-806504%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-806504%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F24499%22%20target%3D%22_blank%22%3E%40Jamil%20Mohammad%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ehi%20jamil%3C%2FP%3E%3CP%3E%3CSPAN%3EI%20used%20your%20code%20but%20it%20does%20not%20work.%26nbsp%3B%20my%20excel%20is%20multiple%20criteria%20and%20ranges%20.%20is%20there%20any%20solution%20for%20my%20problem%3F%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3Ethanks%20in%20advanse%20for%20your%20help%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-807850%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-807850%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F389713%22%20target%3D%22_blank%22%3E%40Pankaj_HSR%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20opened%20your%20file.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ethe%20reason%20you%20get%20%23NAME%20error%20is%20becuase%20you%20have%20not%20used%20UDF%20which%20i%20wrote.%26nbsp%3B%20you%20have%20used%20another%20UDF%20which%20works%20only%20for%20background%20color%20and%20not%20for%20conditional%20formatting.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Eto%20make%20it%20work%2C%20you%20need%20to%20set%20conditionally%20format%20cells%20and%20then%20place%20the%20UDF%20in%20the%20VBA%20module%20and%20then%20it%20will%20work.%26nbsp%3B%3C%2FP%3E%3CP%3EI%20can%20help%20with%20troubleshooting%20the%20file%2C%20however%2C%20I%20am%20sorry%20I%20cannot%20build%20the%20workbook%2C%20as%20i%20do%20not%20have%20time.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-807851%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-807851%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F392830%22%20target%3D%22_blank%22%3E%40samaneeh%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20cannot%20tell%20what%20would%20be%20the%20issue%2C%20unless%20i%20see%20a%20dummy%20example%20file.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-808048%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-808048%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F24499%22%20target%3D%22_blank%22%3E%40Jamil%20Mohammad%3C%2FA%3E%3C%2FP%3E%3CP%3Etanks%20your%20answer..%20it%20is%20my%20file%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-818545%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-818545%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F24499%22%20target%3D%22_blank%22%3E%40Jamil%20Mohammad%3C%2FA%3E%26nbsp%3BThank%20you%20for%20keeping%20this%20alive%20for%20so%20long.%26nbsp%3B%20I%20have%20attached%20a%20recent%20project%20to%20count%20cells%20and%20am%20running%20into%20an%20issue%20with%20the%20formula%20not%20updating%20until%20it%20is%20either%20clicked%20on%20or%20it%20is%20behind%20cell%20updates%20by%202%20inputs.%26nbsp%3B%20What%20am%20I%20doing%20wrong%3F%26nbsp%3B%20Changing%20the%20%22daily%20usage%22%20on%20the%20attached%20sheet%20should%20give%20you%20the%20same%20result%20I%20am%20seeing.%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ETIA%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-838919%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-838919%22%20slang%3D%22en-US%22%3Ehi%20samaneeh%3CBR%20%2F%3E%3CBR%20%2F%3E%3CBR%20%2F%3Eif%20you%20read%20my%20earlier%20posts%2C%20you%20will%20see%20that%20I%20have%20mentioned%20to%20other%20users%20the%20same%20thing%20that%20%22(you%20conditional%20formatting%20applied%20range)%20and%20(range%20used%20in%20the%20UDF)%20both%20should%20be%20the%20same%2C%20otherwise%20it%20would%20not%20work.%20Try%20to%20do%20that%20and%20it%20will%20work.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-838915%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-838915%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20Mike%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ethe%20UDF%20works%20as%20it%20should.%26nbsp%3B%20your%20conditional%20formatting%20in%20the%20cell%20H2%20is%20that%20if%20the%20cell%20value%20is%20smaller%20than%205%20then%20turn%20it%20red%20and%20that%20is%20how%20it%20now%20count%20one%20because%20the%20color%20of%20that%20cell%20is%20red.%26nbsp%3B%20and%20in%20cell%20M3%20color%20is%20yellow%20and%20in%20your%20range%20there%20is%20no%20cell%20with%20yellow%20color%2C%20so%20UDF%20returns%20zero.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-854376%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-854376%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F24499%22%20target%3D%22_blank%22%3E%40Jamil%20Mohammad%3C%2FA%3E%26nbsp%3B%20thank%20you%20for%20your%20reply.%26nbsp%3B%20I%20understand%20but%20the%20calculation%20does%20not%20change%20as%20the%20data%20is%20updated.%26nbsp%3B%20It%20requires%20a%20%22got%20focus%22%2Fdouble%20click%20to%20get%20the%20sheet%20to%20update%20after%20a%20change.%26nbsp%3B%20See%20the%20attached%20example%2C%20the%20field%20color%20can%20be%20updated%20but%20the%20count%20is%20always%20one%20update%20behind.%26nbsp%3B%20In%20the%20attached%20you%20will%20see%20the%20cell%20count%20for%20yellow%20is%200%20but%20should%20be%20one.%26nbsp%3B%20Save%20the%20file%20and%20reopen%20or%20double%20click%20the%20formula%20field%20and%20it%20updates%3F%26nbsp%3B%20This%20always%20leaves%20my%20count%20off%20by%201%20change.%26nbsp%3B%20Any%20advise%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-854468%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20by%20color%20when%20colors%20are%20set%20by%20conditional%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-854468%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F397018%22%20target%3D%22_blank%22%3E%40mikeblc%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHi%2C%20I%20have%20put%20some%20additional%20codes%20in%20the%20attached%20workbook%20that%20forces%20recalculation%20and%20that%20should%20take%20care%20of%20the%20issue%20you%20described.%3C%2FP%3E%3C%2FLINGO-BODY%3E

Hi Jamil,

 

How do I use the UDF to work on all the excel files by default, not just a specific one? Is there a way to set it up under personal macro file?

Michael,

 

please see attached example for COUNT as requested.

 

How to sum conditionally formatted cells based on adjacent cell

Hi Jamil,

 

I tried to use the UDF you shared to sum up conditionally formatted cells based on adjacent cell. The conditional formatting is done using SEARCH formula, basically I am trying to sum up all the sales values for which the adjacent cell (text) contains certain strings. I saw your post related to more complex formulas like VLOOKUP with which the UDF doesn't work, not sure whether SEARCH falls under the same. Appreciated if you can look into it and let me know in case something can be done so the UDF would work in my case as well. Attached the example file.

Andrea,

 

I think you can easily achieve the result you need without over-killing it with conditional formatting UDF.

 

in I5 put Worldwide and in I6 put USA and in the adjacent cell  in J5 put this formula and copy down =SUMPRODUCT(--(ISNUMBER(SEARCH(I5,$E$5:$E$12))),$F$5:$F$12)

 

this will sum based on the condition given and the good part about this is that you do not need to save your excel file with macro enabled option. you can get your results by using built-in Excel functions which is great.

 

please see attached workbook where I embedded the formula in it.

Thanks Jamil, this is super! exactly what I wanted. 

You are welcome Andreea. Thanks for the feedback.

Hi Jamil,

 

I tried to work the count cells by color to work within my workbook, but one sheet isn't working for some reason. I have attached a test version of the document showing the miscounted number. I have 5 red highlights, and it says 2.

 

Thanks,

Hi Carl,

 

 

Looking at your workbook, there is a mismatch between (applied range to) in the conditional formatting and the UDF.

 

If you look at your conditional formatting rules, the red color background rule is applied into three separate noncontinuous range $A$1:$A$54  , range $D$1:$M$54  and range   $B$1:$C$54

while your User Defined function range input is the whole range A1:M54.

The UDF looks up for the match for ranges used in the conditional formatting and the input range inside the function and if there is no match, it will not output correct result.

 

So, if you want to work with the UDF you need to use combination of ranges together in UDF exactly as per the conditional formatting range.  so if you put this =COUNTConditionColorCells($A$1:$A$54,O2)+COUNTConditionColorCells($D$1:$M$54,O2)+COUNTConditionColorCells($B$1:$C$54,O2)

 

it will return 5 which is correct.

 

but if you do not want to use the UDF, then you can acheive the same result by using Excel built-in Functions  like this 

=SUMPRODUCT(--($A$1:$A$54<=(TODAY()-730)))+SUMPRODUCT(--($D$1:$M$54
<=(TODAY()-730)))+SUMPRODUCT(--($B$1:$C$54<=TODAY()-365))

 

The above formula using built-in Excel function will result the same, it returns 5.

 

Hope it helps.

Hi Jamil,

 

I'm trying to count how many cells that are green marked but only gets 0 as the answer even though it should be one. What am I doing wrong? I'm using the vba for counting that you attached earlier in the thread and also conditional formatting.

Hi, I am trying to get a count of each row in your attached example, but when I am passing the row information, it only works correctly for the first row and then the others give the same result. Any way to get this done?

Hi Evelina,

in your workbook, you have set the conditional formatting range differently than the range C5:AX5 you are using in the UD. Also your conditional formatting in column C is just for column C and then from D to the left is $D$6:$AX$6 and this range from column D to AX have not used formula to set up condition formatting. it has used the built in function of "Format only cells that contain" UDF only works if the conditional formatting rule is set using formula option. From what I see in your table, you could easily get the same result using built-in formula of SUMPRODUCT or SUMIFS. Again, your row 3 has n o data, so I would not know what would be the criteria for the formula.

F M

If you examine in detail, your workbook conditional formatting has one rule and it is applied in the whole range of $A$3:$G$16 and when you use the UDF to count per each row then you are giving the UDF a range of single row $A3:$G3 while your conditional formatting range is $A$3:$G$16. Therefore, the mismatch between range of conditional formatting and the input range in the UDF. If you to make it work for per row, then you need to delete edit the conditional formatting and apply range should be the $A3:$G3 and then select $A3:$G3 and click the "Format Painter" and then select the each row separately to add the per row conditional formatting. Then your UDF per row will work.
Besides, you have locked the range to absolute reference in the UDF, so all of the rows refer to the row 3

 

Plz see attached workbook also with a quick video that I have recorded and uploaded here, You can watch the video to learn how you can fix the problem in your workbook.

 

 

Hi Jamil, 

 

I created a test worksheet (highlighted yellow) in my workbook to test the UDF and it works, however it counts one too high for one condition. Could you look at this?

 

Also it appears that the UDF cannot handle my Conditional Formatting formula that I want to check. It uses the INDIRECT function to determine the cell that needs to be checked instead of a direct reference. I highlighted this worksheet green and put the color codes in the reference formatted cells. I don't think I can find a way to create a less complicated Conditional Formatting formula. If I want to rework the formula I need to move a lot of data and clutter the worksheets which I would like to avoid.

 

Could the UDF be modified to recognize INDIRECT functions?

 

Your dedication to this subject is outstanding btw :)

 

Mario

Hello, Jamil

I have read the whole topic on the SumConditionColorCells forum and have not found the answer to my problem.

The file that I sent to you in the appendix contains conditional formatting. In places where there is formatting I want to put the number of employees needed to perform the task.

In the upper lines, add the number of employees needed on a given day. Unfortunately, the SumConditionColorCells function does not work for me in this range.

Please, if you have an idea how to solve it for help.

Hi Mario,

 

the colors you selected for background are not the standard colors, so if you select from one of the standard colors, for example.  change the background color of Past due to red. then the UDF will result correct output.

 

plz see attached.

Hi Zereba,

sorry, I do not have time inspect and add multiple condition formula in your gantt chart template. As you can see in your worksheet Arkusz1 the UDF works. So, making it work on the gantt chart is a matter of putting effort and time. And again, what you are trying to achieve, can be done with Excel built-in Formula similar to the post 204391 link https://techcommunity.microsoft.com/t5/Macros-and-VBA/sum-by-color-when-colors-are-set-by-conditiona...



Highlighted
You are welcome Zareba.

Hi Jamil,

I have a large database (In excess of 200Columns & 8000Rows) which needs to be sorted out by cell color and other multiple criteria. I have tried out multiple things but failed.

I'm basically looking for type of SUMIFS function with ColorIndex as Criteria.

A snap shot is attached.Capture.PNG

null null,

it does not work because you perhaps did not read the rule on how to use this UDF. please see my post here https://techcommunity.microsoft.com/t5/Macros-and-VBA/sum-by-color-when-colors-are-set-by-conditiona...

""UDF will only work, if your rules of conditional formatting is created using conditional formatting rules with formula aka (use a formula to determine which cells to format) ""

Hi Jamil,

 

I had read the all the thread post, But the problem is my worksheet is too large to apply conditional formatting and excel crashes upon conditional formatting.

 

Further, Color coding as seen in each cell is coming from series of various conditions in other spreadsheet. (i.e For each cell in Qty, There are 4-5 activities to be completed each activity having unique color, If particular activity is completed, It will return only "ColorIndex" in current sheet)

 

Hence, I need to sum the fields using "ColorIndex" and other criteria's.

If you are looking for UDF to sum based on index color and not conditional formatted color. then it is even simpler. 

 

you can take the UDF from link here

Hi Jamil,

The said UDF is not suitable to my problem as it cannot sum/count with multiple criteria.

Further i have checked multiple forums for sumif by Cell Color but non are matching my problem.

Extended version of sample result required is attached.

 

 

Capture1.PNG

Hi null null,

 

what you are trying to achieve can be done with a very complicated UDF but will be very CPU hungry.

 

If your colors marks are based on some hardcorded condition which is not from conditional formatting, then use those conditions inside the SUMIFs or SUMPRODUCT and if your colors are based on conditional formatting rules, then use those rules you used in the conditional formatting inside the SUMIFs or SUMPRODUCT formula.

 

for example, from your previous file, you have condition of  if cell values is between 

=0.2791 and =0.3062 then it is red.

 

so you can use the same logic inside the formula for example like this =-SUMIFS(E3:K35,E3:K35,">=0.2791",E3:K35,"<=0.3062")

 

 

 

 

 

Hi Jamil,

Actual what you are same is Correct, I'm already running VBA code in 10 parts to save CPU Memory.
The second logic with example makes some sense, I will try the same in greater depth of details.
I will let you know the result. Thanks in Advance.

Hi Jamil,

Your suggestion worked perfectly.. Thanks at lot..

You are welcome. glad it worked for you.

Hi jamil,

I'm little lost & confused and trying to make my code bit short.

 

In multiple if, Elseifs statements in VBA, I need to use array, But not able to debug it.

 

Excel version of same is attached, Can you help me with vba code..

 

Capture.PNG

Hi Jamil,

Late reply but the colors were indeed the issue for the Test Sheet. For my actual data the UDF doesn't work, even with standard colors. I think it has something to do with the ConvertFormula function in the UDF. My Conditional Formatting uses INDIRECT to determine the cell reference and not a direct cell reference type.

Can this be an issue? And can this be reworked? Workbook hasn't changed.

Cheers, Mario

hi, tnx for your file. is it possible to count color of conditional formatting cells in excel with vba only for those cells which are only numberic? 

Hi Jamil,

 

I have been able to get the UDF to function successfully.  However, when I refresh the data on a different sheet to update that sheet's count of colored cells, the sums change on the previous sheet and/or any other sheet which has summed the cells with conditional formatting.  The cells within the sheet that I refresh on sum correctly, so my conditional formatting should be accurate.  Do I need to establish the UDF to each sheet in the workbook specifically, or is there another way to ensure that the sums calculated on one sheet do not change when a refresh has been run on another sheet?  Would there be anything else I would need to check as to why this is happening?

 

Thank you for your help!


you did not attach anything, besides your question is not relevant to this thread. try posting a new question, 

 

@null null wrote:

Hi jamil,

I'm little lost & confused and trying to make my code bit short.

 

In multiple if, Elseifs statements in VBA, I need to use array, But not able to debug it.

 

Excel version of same is attached, Can you help me with vba code..

 

Capture.PNG


 

Hi Steve,

I am not sure if I understood your question.

The UDF calculation method works exactly as the whole workbook calculation like F9 key.
meaning if the calculation is triggered, it will effect all sheets, and not only a specific sheet.
so, if you want the UDF to only calculate on specific sheet, then the code needs to be modified to work on the worksheet level.

Hi Jamil,

 

When I refresh using F9, the current sheet will show the correct data in the output cell, however this appears to interfere with the output cells on other sheets in the workbook which are trying to sum the color condition using a range of cells on their respective worksheet.  I have attached a sample of the workbook I'm working on to hopefully better illustrate the situation.  Perhaps this is an issue with my conditional formatting formulas, however each sheet is calculating the correct number of colored cells on its own, leading me to believe that this is not the case.  Could you take a look and suggest what I might do to fix this?  If it requires a UDF for each sheet individually, could you help me with a rewrite to make the code sheet specific?

 

Thank you very much for your time!

Hi Steve,

 

thanks for uploading the sample data.

 

Can you please test the attached version?

 

 

Hi Jamil,

 

I am running into an invalid name error with each COUNTConditionColorCells output cell stating that the formulas contain unrecognized text.  I did enable macros on the sheet after downloading it.  However, I can see from the document preview that the first 2 sheets are calculating correctly for both green and red text cells, while the 3rd and 4th sheets are calculating green text cells properly but not the red text cells (sheet 3 shows 6 while it should be 9, sheet 4 shows 10 while it should be 7).

 

Thank you.

Jamil,

 

Please disregard my previous message.  After I enabled Macros, saved, and closed the document, I opened it back up and it was running the formulas properly.  However, I did have to double click the cell and press Enter to refresh the formula so that it would calculate the correct amount.  Regardless, the numbers work and they do not change when I do this to other output cells on separate sheets.  I will need to add what you did on these 4 sheets to several other sheets to get them to work properly as well.  Could you let me know what you changed so that I can make the same edit to the full workbook and its additional sheets?

 

Thank you!

Thanks for the feedback Steve.

I didn’t change anything in the sheets.

Except that I removed one line from the beginning of the code which was
Application.Volatile

That’s it.

If you add more worksheets there should not be any issue.

Jamil,

 

I have made this adjustment after adding more sheets and all is working just as it should.  Thank you so much for all your help on this issue!

You are welcome Steve.

Thanks for the feedback.

Hi Jamil,

 

Thank you for sharing your VBA code.

I have copied your code in my excel file, but I got #VALUE! errors.

Could you check what's wrong with the file?

Thank you for your help in advance.

 

 

 

Jamil I have the same issue as Hyosun.  I've entered the VBA code but cannot get it to work.  No matter what I do it keeps showing the #Value.  I'm trying to count duplicate text based values which seems to be causing some problems. Can you point me towards where the error might be occurring and or a resolution.

 

Thanks

 

Noel

Hi Hyosun Ko,

 

the reason it did not work is, because you used ranges outside the scope range and worksheet in the formula that set conditional formatting.

 

UDF is not designed to handle such complicated formulas outside the scope of CF.

 

however, the good news is that you do not have to use the UDF to ge tthe result which you need.  you can use the built-in SUMPRODUCT function to get the sum based on your conditions exactly like the CF.

 

so for sum of Cabinet use =SUMPRODUCT(G$11:G$20,--(G$11:G$20>0),--ISNUMBER(MATCH($B$11:$B$20,Cabinet_recharge,0)))

 

and for base =SUMPRODUCT(H$11:H$20,--(H$11:H$20>0),--ISNUMBER(MATCH($B$11:$B$20,Base_recharge,0)))

 

for colour =SUMPRODUCT(J$11:J$20,--(J$11:J$20>0),--ISNUMBER(MATCH($B$11:$B$20,Colour_recharge,0)))

 

for installation =SUMPRODUCT(K$11:K$20,--(K$11:K$20>0),--ISNUMBER(MATCH($B$11:$B$20,Installation_recharge,0)))

 

for delivery =SUMPRODUCT(L$11:L$20,--(L$11:L$20>0),--ISNUMBER(MATCH($B$11:$B$20,Delivery_recharge,0)))

 

I have embedded these formulas in the attached workbook.

Hi Noel,

The VALUE error because your conditional formatting was not set using formula.

If you read my earlier post, I have highlighted that UDF only works if the conditional formatting is set by using formula and not the built-in features of CF.

 

So, in the attached workbook, I have set the Conditional Formatting using formula and then the UDF works.

 

please note that SUBTOTALs are not counted as duplicate.   please see attached file and examine it by yourself.

 

Hope it helps.

 

 

Thank you Jamil- so easy when you know how.  Much appreciated.

Dear Jamil,

 

Your help has been really enlightening. If you are available, could you please help me by taking a look at his file?

I am using the VB code you created, but the formula doesn't seem to recognize the CF color and I keep getting the #VALUE! refference.

Could you let me know how to fix this?

 

 

Dear David,

 

The issue with your file was, that UDF was using single row range as the range input, while the Conditional Formatting was applies from L2 to Z8 .   So, i modified the file Conditional Formatting and now it works. 

 

Also inside the CF formula, you used two functions, while this was not cause of error, but to make it simple and faster, i simplified it with a single function of "Columns".

 so =COLUMN(L2)-COLUMN($L2)+1>=$AE2  became =COLUMNS($L2:L2)>=$AE2

 

 

Please download and see attached workbook.  

 

This is awesome, thank you so much for your help!

Jamil -  This is a great tool, however, is it possible to make it work for 3 colors?  The counts and sums are inaccurate for me after the first color when there are more than 2.  Thank you!

Related Conversations
How to Prevent Teams from Auto-Launch
chenrylee in Microsoft Teams on
28 Replies
Tabs and Dark Mode
cjc2112 in Discussions on
2 Replies
Early preview of Microsoft Edge group policies
Sean Lyndersay in Discussions on
65 Replies
*Updated 9/3* Syncing in Microsoft Edge Preview Channels
Elliot Kirk in Articles on
202 Replies