Forum

Notifications
Clear all

Find a name in a list and count specific value in the row.

3 Posts
3 Users
0 Reactions
71 Views
(@viper7513)
Posts: 1
New Member
Topic starter
 

Good morning,

I am looking for a formula that will look up a name in a list, and then count the number of times a certain value is present in the corresponding row.

For example, find Name C in the the list in column A, then count how many times the number one appears in that row. 

EQ-2.PNG

Many thanks

 
Posted : 12/05/2023 5:15 am
Riny van Eekelen
(@riny)
Posts: 1195
Member Moderator
 

Assuming that your data sits in range A2:G8 there are several ways to achieve that.

=COUNTIF(INDEX(B2:G8,MATCH(A12,A2:A8,0),),1)

or

=SUM(--(XLOOKUP(A12,A2:A8,B2:G8)=1))

and then there are other similar solutions.

 
Posted : 12/05/2023 7:44 am
(@keebellah)
Posts: 373
Reputable Member
 

XLOOKUP will only work if the OP's version of Office is 365 or 2021 and newer

 
Posted : 13/05/2023 2:23 am
Share: