SOLVED
Home

Trying to figure out if I use CountIF, CountIFs with multiple criteria and logic.

%3CLINGO-SUB%20id%3D%22lingo-sub-382854%22%20slang%3D%22en-US%22%3ETrying%20to%20figure%20out%20if%20I%20use%20CountIF%2C%20CountIFs%20with%20multiple%20criteria%20and%20logic.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-382854%22%20slang%3D%22en-US%22%3E%3CP%3EI%20am%20trying%20to%20figure%20out%20if%20a%20region%2Fsection%20in%20the%20column%20is%20blank%20or%20not.%20It's%20in%20order%20by%20region%20but%20each%20region%20can%20be%20listed%20multiple%20times%2C%20so%2C%20for%20example%2C%20SEC36%20is%20on%20the%20list%2030%20times%2C%20but%20only%2014%20of%20them%20have%20a%20plan%20listed.%20The%20plan%20is%20listed%20in%20Column%20E.%20I%20don't%26nbsp%3Bneed%20to%20know%20which%20type%20of%20plan%2C%20I%20just%20need%20to%20know%20if%20they%20have%20one%20or%20not.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3DCOUNTIFS(B2%3AB206%2C%22SU036%22%2C%20E2%3AE206%2C%22%26lt%3B%26gt%3B%22)%3C%2FP%3E%3CP%3EI%20started%20with%20this%2C%20and%20it%20counts%20column%20B%2C%20but%20if%20it's%20blank%20or%20not.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-382854%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-386912%22%20slang%3D%22en-US%22%3ERe%3A%20Trying%20to%20figure%20out%20if%20I%20use%20CountIF%2C%20CountIFs%20with%20multiple%20criteria%20and%20logic.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-386912%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F306404%22%20target%3D%22_blank%22%3E%40Armanda406%3C%2FA%3E%26nbsp%3BYes%2C%20it%20works.%20It%20could%20be%20one%20more%20step%20to%20select%20unique%20SU%20automatically%20by%20formula%2C%20but%20if%20you%20have%20more%20or%20less%20static%20data%20that's%20not%20quite%20important.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-386908%22%20slang%3D%22en-US%22%3ERe%3A%20Trying%20to%20figure%20out%20if%20I%20use%20CountIF%2C%20CountIFs%20with%20multiple%20criteria%20and%20logic.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-386908%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F521%22%20target%3D%22_blank%22%3E%40Sergei%20Baklan%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20think%20I%20figured%20it%20out%2C%20the%20SU036%20changes%20to%20SU074%2C%20or%20SU131%20and%20I%20need%20to%20know%20for%20each%20SU%20the%20number%20of%20plans.%20I%20think%20I%20figured%20it%20out%2C%20for%20now.%20I%20copied%20the%20SU%20list%20and%20then%20removed%20any%20duplicates%2C%20I%20added%20to%20Column%20G%20and%20then%20using%20absolute%20and%20adding%20the%20Cell%20I%20needed%20to%20reference%20that%20contains%20each%20Unique%20SU%2C%20it%20seems%20to%20work%20out%20and%20count%20each%20SU%20that%20is%20not%20blank.%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22%20default-formula-text-color%22%3E%3D%3C%2FSPAN%3E%3CSPAN%20class%3D%22%20default-formula-text-color%22%3ESUMPRODUCT%3C%2FSPAN%3E%3CSPAN%20class%3D%22%20default-formula-text-color%22%3E(%3C%2FSPAN%3E%3CSPAN%20class%3D%22%20default-formula-text-color%22%3E(%3C%2FSPAN%3E%3CSPAN%3EB%242%3AB%24206%3C%2FSPAN%3E%3CSPAN%20class%3D%22%20%20default-formula-text-color%22%3E%3D%3C%2FSPAN%3E%3CSPAN%3EG2%3C%2FSPAN%3E%3CSPAN%20class%3D%22%20default-formula-text-color%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22%20%20default-formula-text-color%22%3E*%3C%2FSPAN%3E%3CSPAN%20class%3D%22%20default-formula-text-color%22%3E(%3C%2FSPAN%3E%3CSPAN%20class%3D%22%20default-formula-text-color%22%3ELEN%3C%2FSPAN%3E%3CSPAN%20class%3D%22%20default-formula-text-color%22%3E(%3C%2FSPAN%3E%3CSPAN%3EE%242%3AE%24206%3C%2FSPAN%3E%3CSPAN%20class%3D%22%20default-formula-text-color%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22%20%20default-formula-text-color%22%3E%26gt%3B%3C%2FSPAN%3E%3CSPAN%20class%3D%22number%22%3E0%3C%2FSPAN%3E%3CSPAN%20class%3D%22%20default-formula-text-color%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22%20default-formula-text-color%22%3E)%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-386857%22%20slang%3D%22en-US%22%3ERe%3A%20Trying%20to%20figure%20out%20if%20I%20use%20CountIF%2C%20CountIFs%20with%20multiple%20criteria%20and%20logic.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-386857%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EDo%20I%20understand%20correctly%20what%20other%20words%20you%20need%20number%20of%20unique%20SU%20minus%20one%3F%20Or%20that%20could%20be%20the%20situation%20when%20you%20change%20from%20SU1%20on%20SU2%20and%20after%20that%20back%20on%20SU1%20and%20it%20will%20be%202%20changes%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-386830%22%20slang%3D%22en-US%22%3ERe%3A%20Trying%20to%20figure%20out%20if%20I%20use%20CountIF%2C%20CountIFs%20with%20multiple%20criteria%20and%20logic.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-386830%22%20slang%3D%22en-US%22%3EYes%2C%20I%20was%20just%20deleting%20the%20value%20from%20the%20cell.%20I%20was%20just%20trying%20to%20test%20it%20to%20see%20if%20it%20would%20update%2C%20but%20I%20remember%20now%20that%20it%20will%20still%20count%20it%2C%20so%20if%20I%20don't%20need%20to%20clear%20a%20plan%20then%20it%20is%20working.%20My%20other%20part%20to%20this%2C%20is%20how%20do%20I%20get%20the%20formula%20to%20count%20each%20change%20in%20SU%3F%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-383022%22%20slang%3D%22en-US%22%3ERe%3A%20Trying%20to%20figure%20out%20if%20I%20use%20CountIF%2C%20CountIFs%20with%20multiple%20criteria%20and%20logic.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-383022%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F521%22%20target%3D%22_blank%22%3E%40Sergei%20Baklan%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20for%20the%20summary%3B%20there%20is%20still%20a%20certain%20amount%20of%20trial%20and%20error%20with%20my%20formula%20development%20in%20this%20area.%26nbsp%3B%20I%20selected%20and%20have%20used%20%22%26gt%3B%40%22%20on%20occasion%20because%20it%20comes%20before%20'A'%20in%20the%20ASCII%20sequence.%26nbsp%3B%20Mind%20you%20the%20sort%20order%20is%20not%20always%20obvious%20when%20it%20comes%20to%20mixes%20of%20numbers%2C%20letters%2C%20non-alphanumeric%20characters%20and%20spaces.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-383019%22%20slang%3D%22en-US%22%3ERe%3A%20Trying%20to%20figure%20out%20if%20I%20use%20CountIF%2C%20CountIFs%20with%20multiple%20criteria%20and%20logic.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-383019%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F306622%22%20target%3D%22_blank%22%3E%40Maximus1988%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20not%20sure%20whether%20this%20relates%20to%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F306404%22%20target%3D%22_blank%22%3E%40Armanda406%3C%2FA%3E's%20question.%3C%2FP%3E%3CP%3EHowever%2C%20you%20formula%20will%20point%20to%20the%20same%20cells%20and%20the%20sheet%20name%20is%20needed%20for%20references%20between%20sheets.%26nbsp%3B%20If%20there%20are%20values%20on%20the%20new%20sheet%20which%20could%20meaningfully%20be%20referenced%20by%20the%20formula%2C%20then%20you%20simply%20need%20to%20work%20through%20the%20references%2C%20removing%20the%20sheet%20name%20and%20adjusting%20the%20position%20of%20the%20reference%20if%20necessary.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-383018%22%20slang%3D%22en-US%22%3ERe%3A%20Trying%20to%20figure%20out%20if%20I%20use%20CountIF%2C%20CountIFs%20with%20multiple%20criteria%20and%20logic.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-383018%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F306622%22%20target%3D%22_blank%22%3E%40Maximus1988%3C%2FA%3E%26nbsp%3B%2C%20I%20guess%20that's%20the%20question%20for%20separate%20conversation%2C%20better%20to%20start%20such.%20Plus%20clarify%20a%20bit%20what%20do%20you%20copy%20-%20formula%20itself%20or%20cell%20with%20the%20formula.%20And%20you%20not%20only%20copy%20it%2C%20you%20paste%20it%20-%20just%20Paste%20all%20cell%20content%2C%20or%20Paste%20Special%20-%26gt%3B%20Formulas%20or%20what.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-383017%22%20slang%3D%22en-US%22%3ERe%3A%20Trying%20to%20figure%20out%20if%20I%20use%20CountIF%2C%20CountIFs%20with%20multiple%20criteria%20and%20logic.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-383017%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F214174%22%20target%3D%22_blank%22%3E%40Peter%20Bartholomew%3C%2FA%3E%26nbsp%3B%2C%20IMHO%20the%20main%20question%20here%20is%20what%20we%20consider%20as%20empty%20cell.%20That%20could%20be%20the%20blank%20cells%20(no%20content%20at%20all)%20only%2C%20or%20blank%20cells%20and%20cells%20with%20empty%20string%20(%22%22%2C%20which%20we%20usually%20use%20to%20imitate%20blank%20cells).%20If%20do%20small%20test%20we%20will%20see%20the%20difference%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20299px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F97227i49100BA13C07992B%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22image.png%22%20title%3D%22image.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EHere%20two%20yellow%20cells%20are%20with%20empty%20string%20and%20one%20cell%20is%20blank.%20Total%206%20cells%2C%202%20empty%20plus%201%20blank.%3C%2FP%3E%0A%3CP%3ECOUNTA()%20doesn't%20consider%20cells%20with%20empty%20strings%20as%20blank%20and%20count%20them%2C%20same%20do%20COUNTIFS().%20Just%20in%20case%2C%20COUNTBLANK()%20in%20opposite%20counts%20both%20blank%20and%20empty%20ans%20blanks.%20SUMPRODUCT()%20does%20correct%20calculations%20excluding%20all%20cells%20with%20empty%20strings%20and%20blank%20ones.%20Variant%20with%20LEN()%20is%20more%20straightforward%20and%20gives%20less%20reasons%20for%20misinterpretations.%3C%2FP%3E%0A%3CP%3EAs%20for%26nbsp%3B%40%20that's%20not%20wildcard%2C%20only%20the%20character%20which%20is%20more%20close%20to%20the%20beginning%20of%20ASCII%20table%20compare%20to%20other%20characters.%20However%2C%20%23%20is%20even%20earlier%20plus%20any%20number%20is%20always%20less%20than%20any%20text%2C%20thus%20formula%20counts%20only%20the%20cell%20with%20a1.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EBack%20to%20initial%20question%20I'd%20use%20SUMPRODUCT%20like%3C%2FP%3E%0A%3CPRE%3E%3DSUMPRODUCT((B2%3AB206%3D%22SU036%22)*(LEN(E2%3AE206)%26gt%3B0))%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-383013%22%20slang%3D%22en-US%22%3ERe%3A%20Trying%20to%20figure%20out%20if%20I%20use%20CountIF%2C%20CountIFs%20with%20multiple%20criteria%20and%20logic.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-383013%22%20slang%3D%22en-US%22%3E%3CP%3EI%20am%20trying%20to%20copie%20a%20formule%20used%20in%20tab%20sheet%20'Sales'%20to%20tab%20sheet%20'Total%20Sales'.%3C%2FP%3E%3CP%3EHowever%20it%20doesn't%20copy%20the%20formule%20but%20it's%20just%20mentioning%20the%20tabsheet%20name%20%2B%20cell%20number.%3C%2FP%3E%3CP%3EAny%20idea%20what%20this%20could%20be%3F%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F214174%22%20target%3D%22_blank%22%3E%40Peter%20Bartholomew%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EBest%2C%3C%2FP%3E%3CP%3EMax%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-383005%22%20slang%3D%22en-US%22%3ERe%3A%20Trying%20to%20figure%20out%20if%20I%20use%20CountIF%2C%20CountIFs%20with%20multiple%20criteria%20and%20logic.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-383005%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F521%22%20target%3D%22_blank%22%3E%40Sergei%20Baklan%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWhat%20do%20you%20think%20of%20%22%26gt%3B%40%22%20as%20a%20test%20for%20the%20existence%20of%20text%3F%3C%2FP%3E%3CP%3EIt%20attempts%20to%20combine%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F306404%22%20target%3D%22_blank%22%3E%40Armanda406%3C%2FA%3E's%20idea%20of%20COUNTA%20with%20the%20IFS%20formula%20structure.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-383000%22%20slang%3D%22en-US%22%3ERe%3A%20Trying%20to%20figure%20out%20if%20I%20use%20CountIF%2C%20CountIFs%20with%20multiple%20criteria%20and%20logic.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-383000%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F280482%22%20target%3D%22_blank%22%3E%40Twifoo%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CBLOCKQUOTE%3E%3CHR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F280482%22%20target%3D%22_blank%22%3E%40Twifoo%3C%2FA%3E%26nbsp%3Bwrote%3A%3CBR%20%2F%3EThe%20criteria2%20argument%20of%20COUNTIFS%20is%20incomplete.%20There%20is%20no%20value%20against%20which%20E2%20could%20be%20compared.%3CHR%20%2F%3E%3C%2FBLOCKQUOTE%3E%3CP%3EA%20criterion%20%22%26lt%3B%26gt%3B%22%20in%20any%20of%20the%20IFS%20functions%20does%20carry%20meaning.%3C%2FP%3E%3CP%3EThe%20equivalent%20condition%20in%20SUMPRODUCT%2C%20say%2C%20would%20be%26nbsp%3B%3C%2FP%3E%3CP%3E%3D%20(%20value%20%26lt%3B%26gt%3B%20%22%22%20)%3C%2FP%3E%3CP%3EWithin%20an%20IFS%20function%20is%20suppose%20it%20could%20be%20presented%20as%3C%2FP%3E%3CP%3E%3D%20COUNTIFS(%20%E2%80%A6%2C%20%E2%80%A6%2C%20value%2C%20%22%26lt%3B%26gt%3B%22%20%26amp%3B%20%22%22%20)%3C%2FP%3E%3CP%3Ebut%20that%20reduces%20to%20the%20first%20form.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-382946%22%20slang%3D%22en-US%22%3ERe%3A%20Trying%20to%20figure%20out%20if%20I%20use%20CountIF%2C%20CountIFs%20with%20multiple%20criteria%20and%20logic.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-382946%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F306404%22%20target%3D%22_blank%22%3E%40Armanda406%3C%2FA%3E%20%2C%20how%20do%20you%20clean%20the%20plan%2C%20just%20delete%20the%20value%20from%20the%20cell(s)%20or%20by%20some%20other%20way%3F%20If%20that's%20the%20formula%20which%20returns%20%22%22%20your%20COUNTIFS%20won't%20consider%20it%20as%20the%20blank.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-382937%22%20slang%3D%22en-US%22%3ERe%3A%20Trying%20to%20figure%20out%20if%20I%20use%20CountIF%2C%20CountIFs%20with%20multiple%20criteria%20and%20logic.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-382937%22%20slang%3D%22en-US%22%3EThat%20is%20what%20I%20thought%20it%20gives%20the%20number%2014%2C%20but%20when%20I%20clear%20a%20plan%20the%20number%20does%20not%20change.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-382934%22%20slang%3D%22en-US%22%3ERe%3A%20Trying%20to%20figure%20out%20if%20I%20use%20CountIF%2C%20CountIFs%20with%20multiple%20criteria%20and%20logic.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-382934%22%20slang%3D%22en-US%22%3ENo%20value%20as%20in%20a%20number%3F%20I%20just%20want%20it%20to%20count%20if%20it%20has%20text%20in%20the%20box%3F%20Maybe%20I%20need%20CountA%3F%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-382930%22%20slang%3D%22en-US%22%3ERe%3A%20Trying%20to%20figure%20out%20if%20I%20use%20CountIF%2C%20CountIFs%20with%20multiple%20criteria%20and%20logic.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-382930%22%20slang%3D%22en-US%22%3EThe%20criteria2%20argument%20of%20COUNTIFS%20is%20incomplete.%20There%20is%20no%20value%20against%20which%20E2%20could%20be%20compared.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-382917%22%20slang%3D%22en-US%22%3ERe%3A%20Trying%20to%20figure%20out%20if%20I%20use%20CountIF%2C%20CountIFs%20with%20multiple%20criteria%20and%20logic.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-382917%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F306404%22%20target%3D%22_blank%22%3E%40Armanda406%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20formula%20looks%20correct%20and%20should%20return%20the%20count%20of%20cells%20containing%20%22SU036%22%20with%20non-blank%20plans.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Armanda406
Occasional Contributor

I am trying to figure out if a region/section in the column is blank or not. It's in order by region but each region can be listed multiple times, so, for example, SEC36 is on the list 30 times, but only 14 of them have a plan listed. The plan is listed in Column E. I don't need to know which type of plan, I just need to know if they have one or not. 

 

=COUNTIFS(B2:B206,"SU036", E2:E206,"<>")

I started with this, and it counts column B, but if it's blank or not. 

16 Replies

@Armanda406 

The formula looks correct and should return the count of cells containing "SU036" with non-blank plans.

The criteria2 argument of COUNTIFS is incomplete. There is no value against which E2 could be compared.
No value as in a number? I just want it to count if it has text in the box? Maybe I need CountA?
That is what I thought it gives the number 14, but when I clear a plan the number does not change.

@Armanda406 , how do you clean the plan, just delete the value from the cell(s) or by some other way? If that's the formula which returns "" your COUNTIFS won't consider it as the blank.

@Twifoo 


@Twifoo wrote:
The criteria2 argument of COUNTIFS is incomplete. There is no value against which E2 could be compared.

A criterion "<>" in any of the IFS functions does carry meaning.

The equivalent condition in SUMPRODUCT, say, would be 

= ( value <> "" )

Within an IFS function is suppose it could be presented as

= COUNTIFS( …, …, value, "<>" & "" )

but that reduces to the first form.

 

@Sergei Baklan 

What do you think of ">@" as a test for the existence of text?

It attempts to combine @Armanda406's idea of COUNTA with the IFS formula structure. 

I am trying to copie a formule used in tab sheet 'Sales' to tab sheet 'Total Sales'.

However it doesn't copy the formule but it's just mentioning the tabsheet name + cell number.

Any idea what this could be? @Peter Bartholomew 

 

Best,

Max

Solution

@Peter Bartholomew , IMHO the main question here is what we consider as empty cell. That could be the blank cells (no content at all) only, or blank cells and cells with empty string ("", which we usually use to imitate blank cells). If do small test we will see the difference

image.png

Here two yellow cells are with empty string and one cell is blank. Total 6 cells, 2 empty plus 1 blank.

COUNTA() doesn't consider cells with empty strings as blank and count them, same do COUNTIFS(). Just in case, COUNTBLANK() in opposite counts both blank and empty ans blanks. SUMPRODUCT() does correct calculations excluding all cells with empty strings and blank ones. Variant with LEN() is more straightforward and gives less reasons for misinterpretations.

As for @ that's not wildcard, only the character which is more close to the beginning of ASCII table compare to other characters. However, # is even earlier plus any number is always less than any text, thus formula counts only the cell with a1.

 

Back to initial question I'd use SUMPRODUCT like

=SUMPRODUCT((B2:B206="SU036")*(LEN(E2:E206)>0))

 

@Maximus1988 , I guess that's the question for separate conversation, better to start such. Plus clarify a bit what do you copy - formula itself or cell with the formula. And you not only copy it, you paste it - just Paste all cell content, or Paste Special -> Formulas or what.

@Maximus1988 

I am not sure whether this relates to @Armanda406's question.

However, you formula will point to the same cells and the sheet name is needed for references between sheets.  If there are values on the new sheet which could meaningfully be referenced by the formula, then you simply need to work through the references, removing the sheet name and adjusting the position of the reference if necessary.

@Sergei Baklan 

Thanks for the summary; there is still a certain amount of trial and error with my formula development in this area.  I selected and have used ">@" on occasion because it comes before 'A' in the ASCII sequence.  Mind you the sort order is not always obvious when it comes to mixes of numbers, letters, non-alphanumeric characters and spaces.

Yes, I was just deleting the value from the cell. I was just trying to test it to see if it would update, but I remember now that it will still count it, so if I don't need to clear a plan then it is working. My other part to this, is how do I get the formula to count each change in SU?

Hi,

 

Do I understand correctly what other words you need number of unique SU minus one? Or that could be the situation when you change from SU1 on SU2 and after that back on SU1 and it will be 2 changes?

@Sergei Baklan 

I think I figured it out, the SU036 changes to SU074, or SU131 and I need to know for each SU the number of plans. I think I figured it out, for now. I copied the SU list and then removed any duplicates, I added to Column G and then using absolute and adding the Cell I needed to reference that contains each Unique SU, it seems to work out and count each SU that is not blank. 

=SUMPRODUCT((B$2:B$206=G2)*(LEN(E$2:E$206)>0))

 

@Armanda406 Yes, it works. It could be one more step to select unique SU automatically by formula, but if you have more or less static data that's not quite important.

Related Conversations
Stable version of Edge insider browser
HotCakeX in Discussions on
35 Replies
flashing a white screen while open new tab
cntvertex in Discussions on
13 Replies
Tabs and Dark Mode
cjc2112 in Discussions on
22 Replies
How to Prevent Teams from Auto-Launch
chenrylee in Microsoft Teams on
28 Replies
Edge insider Dev bypasses IE mode website list
HotCakeX in Enterprise on
4 Replies