SOLVED

count functions

%3CLINGO-SUB%20id%3D%22lingo-sub-1491643%22%20slang%3D%22en-US%22%3Ecount%20functions%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1491643%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%20I%20want%20to%20count%20a%20row%20of%20cells%2C%20but%20I%20only%20want%20to%20count%20them%20when%20another%20row%20of%20cells%20have%20numbers%20in%20them.%3C%2FP%3E%3CP%3EI've%20tried%20this%20but%20I%20don't%20get%20the%20result%20I%20want.%26nbsp%3B%3DCOUNTIFS(Medal!%24E%2419%3A%24Z%2419%2C%22%26lt%3B%26gt%3B%22%26amp%3B%22*%22%2CMedal!%24E%247%3A%24Z%247%2C%22%26lt%3B%26gt%3B%22%26amp%3B%22*%22)%3C%2FP%3E%3CP%3EAny%20help%20would%20be%20nice.%3C%2FP%3E%3CP%3EThanks%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1491643%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1491732%22%20slang%3D%22en-US%22%3ERe%3A%20count%20functions%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1491732%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F711099%22%20target%3D%22_blank%22%3E%40ronniesteel%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAs%20variant%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-excel%22%3E%3CCODE%3E%3DSUMPRODUCT(%20(LEN(Medal!%24E%2419%3A%24Z%2419)%26gt%3B0)*(LEN(Medal!%24E%247%3A%24Z%247)%26gt%3B0))%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1491824%22%20slang%3D%22en-US%22%3ERe%3A%20count%20functions%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1491824%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%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20for%20your%20help.%3C%2FP%3E%3CP%3EWorks%20great.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECheers%2C%3C%2FP%3E%3CP%3ERonnie.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1491843%22%20slang%3D%22en-US%22%3ERe%3A%20count%20functions%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1491843%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F711099%22%20target%3D%22_blank%22%3E%40ronniesteel%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ERonnie%2C%20you%20are%20welcome%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Occasional Contributor

Hi, I want to count a row of cells, but I only want to count them when another row of cells have numbers in them.

I've tried this but I don't get the result I want. =COUNTIFS(Medal!$E$19:$Z$19,"<>"&"*",Medal!$E$7:$Z$7,"<>"&"*")

Any help would be nice.

Thanks

3 Replies
Highlighted
Best Response confirmed by ronniesteel (Occasional Contributor)
Solution

@ronniesteel 

As variant

=SUMPRODUCT( (LEN(Medal!$E$19:$Z$19)>0)*(LEN(Medal!$E$7:$Z$7)>0))
Highlighted

@Sergei Baklan 

 

Thanks for your help.

Works great. 

 

Cheers,

Ronnie.

Highlighted

@ronniesteel 

Ronnie, you are welcome