Question

in column B I have "CM" in a range =COUNTIF(B:B,"CM") will return the total count of all cells that contain "CM"

I need to take it one more step. where column B contains CM I need to count the range in column H only if the range in H has data/text

Thanks David

Was it helpful?

Solution

Change your formula to a COUNTIFS which takes multiple parameter sets and use the second parameter set to test if column H has no value/text

=COUNTIFS(B:B,"CM",H:H,"<>")

Note, this doesn't exclude the possibility that cells in column H may contain a formula. That's a question I can't answer.

I'm not sure if you wanted to count cells in column B that equal "CM" or contain "CM". Your formula will count any cells that equal upper or lower case "cm" (or any combination thereof). If you really want cells containing "CM", wrap it in asterisks

=COUNTIFS(B:B,"*CM*",H:H,"<>")

OTHER TIPS

Try this:

=COUNTIFS(B:B,"CM", H:H, "*")
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top