GamingNerd83
GamingNerd83

Reputation: 1

Excel Count Function to Match

I need to count all rows with a value but not duplicate. So in my picture I need to get 19 total units. If column B has a value and column C and so on, I only want to count that once.

Not sure I make sense. I need to count each row once if there is a value in at least one of the columns.

Upvotes: 0

Views: 46

Answers (1)

Scott Craner
Scott Craner

Reputation: 152450

One can use SUMPRODUCT():

=SUMPRODUCT(--((B2:B31<>"")+(C2:C31<>"")+(D2:D31<>"")>0))

Or MMULT():

=SUM(--(MMULT(--(B2:D31<>""),TRANSPOSE(COLUMN(B2:D31)^0))>0))

This second one may need to be confirmed with Ctrl-Shift-Enter instead of Enter when exiting Edit mode on some versions.

enter image description here

Upvotes: 2

Related Questions