matthewr
matthewr

Reputation: 324

countifs with an or statement - excel

I have a workbook where im referencing another workbook to count a certain number of items.

conditions: 1) col B has 11103,11104, or 11105 in it, 2) col F contains /2A DT

everything works fine if i just put 11103 in it, ive tried different permutations of the OR statement but cant find to find one that works, any suggestions? below is the formula:

=COUNTIFS('[all schools nfer log.xlsx VERSION 2.xlsx]Sheet1'!$B:$B,OR('[all schools nfer log.xlsx VERSION 2.xlsx]Sheet1'!$B:$B=11103,'[all schools nfer log.xlsx VERSION 2.xlsx]Sheet1'!$B:$B=11104,'[all schools nfer log.xlsx VERSION 2.xlsx]Sheet1'!$B:$B=11105),'[all schools nfer log.xlsx VERSION 2.xlsx]Sheet1'!$F:$F,"/2A DT")

Upvotes: 0

Views: 46

Answers (1)

QHarr
QHarr

Reputation: 84465

Adding in your workbook names of course but a general outline of

=SUM(COUNTIFS(B:B,{11103,11104,11105},F:F,"/2A DT"))

Which I guess would look like

=SUM(COUNTIFS('[all schools nfer log.xlsx VERSION 2.xlsx]Sheet1'!$B:$B,{11103,11104,11105},'[all schools nfer log.xlsx VERSION 2.xlsx]Sheet1'!$F:$F,"/2A DT"))

Upvotes: 1

Related Questions