jvrnnz
jvrnnz

Reputation: 1

Count phone number in Column C if only Column A has specific Location

I need to count how many phone numbers are associated with people who work at a specific location, only. Not all rows have a phone number, but I need the ones that DO have a phone number.

Location Name Phone
Location A Person A 123-456-7891
Location B Person B 123-456-7892
Location A Person C 123-456-7893
Location A Person D
Location C Person E 123-456-7895
Location C Person F 123-456-7896
Location B Person G 123-456-7897

I have tried to use CountIfs and counta formulas but keep getting errors.

I've tried:

=countifs(A2:A8,"Location A",C2:C8,counta(C2:C8)) but I get back 0.

I get errors when I try different versions of it too.

Upvotes: 0

Views: 42

Answers (2)

rockinfreakshow
rockinfreakshow

Reputation: 29982

you can collate the entire list as such using:

=BYROW(UNIQUE(FILTER(A2:A,A2:A<>"")),LAMBDA(z,{z,COUNTA(UNIQUE(FILTER(C:C,A:A=z)))}))

enter image description here

Upvotes: 0

Harun24hr
Harun24hr

Reputation: 36880

Use-

=COUNTIFS(A2:A8,"1340 Ansin",C2:C8,"<>")

Or QUERY() function like -

=QUERY(A2:C,"select count(A) where A='1340 Ansin' and C is not null label count(A) ''",0)

enter image description here

Upvotes: 0

Related Questions