COUNTIFS

DJ038

New Member
Joined
Jun 11, 2024
Messages
7
Office Version
  1. 365
  2. 2021
  3. 2019
Platform
  1. Windows
I have formula COUNTIFS with 3 conditions: '=COUNTIFS('Assets'!A1:FG1,B29,'Assets'!L2:L200,C28,'Assets'!AY2:AY200,"Yes")...I'm getting #VELUE output, why?
 
OK , how about making an IF with a AND and count

We count to see if word exists in the row 1
COUNTIF('Assets'!A1:FG1,"Word") OR as you are using B29 COUNTIF(A1:FG1,B29)
And that will return true
NEXT
Countif('Assets'!L2:L200,C28)
put those into and AND

AND(COUNTIF(A1:FG1,B29),Countif('Assets'!L2:L200,C28))

Now if both are true we can count the YES again using a count
Countif('Assets'!AY2:AY200,"Yes")

SO
=IF( AND(COUNTIF(A1:FG1,B29),Countif('Assets'!L2:L200,C28)), Countif('Assets'!AY2:AY200,"Yes") , "" )

I have put into a simple sheet to show

Book2
ABCDEFGHI
1word
23
3yes
4
5
6yes
7Associateyes
8
Sheet1
Cell Formulas
RangeFormula
I2I2=IF(AND(COUNTIF(A1:H1,"Word"),COUNTIF(C1:C20,"associate")),COUNTIF(G1:G20,"yes"),"")


will that work for you
Sorry for my late response, I tried to work on this by myself

Thanks for the inputs, however formula =IF( AND(COUNTIF(A1:FG1,B29),Countif('Assets'!L2:L200,C28)), Countif('Assets'!AY2:AY200,"Yes") , "" ) is not what I need.

In column 'C' i have groups in row 'A' i have apps, and i need to know how many apps is used per group…how many 'yes' entries I have in the entire table by following this 'if' statements

My logic was if in column 'C' there is 'Admin' and in row 'A' there is 'Visio' count all 'Yes' entries in the entire table…outcome should be 1

My table has around 200 columns and over 1000 rows…

Below is an example....

Users​
Groups​
WordExcelPowerPointOutlookSharePointTeamsEdgeVisioMS Project
User 1​
Operations​
YesYesYesYesYesYesYesYesNo
user 2​
IT​
YesYesYesYesYesYesYesYesNo
User 3​
Admin​
YesYesYesYesYesYesYesNoYes
User 4​
Analytic​
YesYesYesYesYesYesYesNoYes
User 5​
Data​
YesYesYesYesYesYesYesNoNo
User 6​
Analytic​
YesYesYesYesYesYesYesNoNo
User 7​
Analytic​
YesYesYesYesYesYesYesYesNo
User 8​
Operations​
YesYesYesYesYesYesYesNoYes
User 9​
Admin​
YesYesYesYesYesYesYesNoNo
User 10​
Data​
YesYesYesYesYesYesYesNoNo
User 11​
Operations​
YesYesYesYesNoYesYesNoNo
User 12​
Operations​
YesYesYesYesYesYesYesYesYes
User 13​
Operations​
YesYesYesYesYesYesYesNoNo
User 14​
Data​
YesYesYesYesYesYesYesNoNo
User 15​
Analytic​
YesYesYesYesYesYesYesNoNo
User 16​
Data​
YesYesYesYesYesYesYesNoNo
User 17​
Operations​
YesYesYesYesYesYesYesNoYes
User 18​
Admin​
YesYesYesYesYesYesYesNoNo
User 19​
Admin​
YesYesYesYesNoYesYesYesNo
User 20​
Admin​
YesYesYesYesYesYesYesNoNo
User 21​
Operations​
YesYesYesYesYesYesYesNoNo
User 22​
Analytic​
YesYesYesYesYesYesYesNoYes
User 23​
Analytic​
YesYesYesYesYesYesYesNoNo
AdminAnalyticDataITOperations
Word​
56417
Excel​
56417
PowerPoint​
56417
Outlook​
56417
SharePoint​
46416
Teams​
56417
Edge​
56417
Visio​
1112
MS Project​
123
 
Upvote 0

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
Try this.
Book1
ABCDEFGHIJKLMNOPQRS
1UsersGroupsWordExcelPowerPointOutlookSharePointTeamsEdgeVisioMS ProjectAdminAnalyticDataITOperations
2User 1OperationsYesYesYesYesYesYesYesYesNoWord56417
3user 2ITYesYesYesYesYesYesYesYesNoExcel56417
4User 3AdminYesYesYesYesYesYesYesNoYesPowerPoint56417
5User 4AnalyticYesYesYesYesYesYesYesNoYesOutlook56417
6User 5DataYesYesYesYesYesYesYesNoNoSharePoint46416
7User 6AnalyticYesYesYesYesYesYesYesNoNoTeams56417
8User 7AnalyticYesYesYesYesYesYesYesYesNoEdge56417
9User 8OperationsYesYesYesYesYesYesYesNoYesVisio11012
10User 9AdminYesYesYesYesYesYesYesNoNoMS Project12003
11User 10DataYesYesYesYesYesYesYesNoNo
12User 11OperationsYesYesYesYesNoYesYesNoNo
13User 12OperationsYesYesYesYesYesYesYesYesYes
14User 13OperationsYesYesYesYesYesYesYesNoNo
15User 14DataYesYesYesYesYesYesYesNoNo
16User 15AnalyticYesYesYesYesYesYesYesNoNo
17User 16DataYesYesYesYesYesYesYesNoNo
18User 17OperationsYesYesYesYesYesYesYesNoYes
19User 18AdminYesYesYesYesYesYesYesNoNo
20User 19AdminYesYesYesYesNoYesYesYesNo
21User 20AdminYesYesYesYesYesYesYesNoNo
22User 21OperationsYesYesYesYesYesYesYesNoNo
23User 22AnalyticYesYesYesYesYesYesYesNoYes
24User 23AnalyticYesYesYesYesYesYesYesNoNo
Sheet1
Cell Formulas
RangeFormula
N1:R1N1=TOROW(UNIQUE(SORT(B2:B24)))
M2:M10M2=TOCOL(C1:K1)
N2:R10N2=SUM(($B$2:$B$24=N$1)*($C$1:$K$1=$M2)*($C$2:$K$24="Yes"))
Dynamic array formulas.
 
Upvote 0
Try this.
Book1
ABCDEFGHIJKLMNOPQRS
1UsersGroupsWordExcelPowerPointOutlookSharePointTeamsEdgeVisioMS ProjectAdminAnalyticDataITOperations
2User 1OperationsYesYesYesYesYesYesYesYesNoWord56417
3user 2ITYesYesYesYesYesYesYesYesNoExcel56417
4User 3AdminYesYesYesYesYesYesYesNoYesPowerPoint56417
5User 4AnalyticYesYesYesYesYesYesYesNoYesOutlook56417
6User 5DataYesYesYesYesYesYesYesNoNoSharePoint46416
7User 6AnalyticYesYesYesYesYesYesYesNoNoTeams56417
8User 7AnalyticYesYesYesYesYesYesYesYesNoEdge56417
9User 8OperationsYesYesYesYesYesYesYesNoYesVisio11012
10User 9AdminYesYesYesYesYesYesYesNoNoMS Project12003
11User 10DataYesYesYesYesYesYesYesNoNo
12User 11OperationsYesYesYesYesNoYesYesNoNo
13User 12OperationsYesYesYesYesYesYesYesYesYes
14User 13OperationsYesYesYesYesYesYesYesNoNo
15User 14DataYesYesYesYesYesYesYesNoNo
16User 15AnalyticYesYesYesYesYesYesYesNoNo
17User 16DataYesYesYesYesYesYesYesNoNo
18User 17OperationsYesYesYesYesYesYesYesNoYes
19User 18AdminYesYesYesYesYesYesYesNoNo
20User 19AdminYesYesYesYesNoYesYesYesNo
21User 20AdminYesYesYesYesYesYesYesNoNo
22User 21OperationsYesYesYesYesYesYesYesNoNo
23User 22AnalyticYesYesYesYesYesYesYesNoYes
24User 23AnalyticYesYesYesYesYesYesYesNoNo
Sheet1
Cell Formulas
RangeFormula
N1:R1N1=TOROW(UNIQUE(SORT(B2:B24)))
M2:M10M2=TOCOL(C1:K1)
N2:R10N2=SUM(($B$2:$B$24=N$1)*($C$1:$K$1=$M2)*($C$2:$K$24="Yes"))
Dynamic array formulas.
Many thanks, it works :)
 
Upvote 0

Forum statistics

Threads
1,221,618
Messages
6,160,873
Members
451,674
Latest member
TJPsmt

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top