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?
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
you are counting mixed ranges
'Assets'!A1:FG1
'Assets'!L2:L200,C28

what exactly are you wanting to do - can you give an example
 
Upvote 0
you are counting mixed ranges
'Assets'!A1:FG1
'Assets'!L2:L200,C28

what exactly are you wanting to do - can you give an example
If in the column L2:L200 there is 'Associate', if in the row A1:AG1 is 'Word' than count 'Yes' in the column AY2:AY20
 
Upvote 0
If in the column L2:L200 there is 'Associate', if in the row A1:AG1 is 'Word' than count 'Yes' in the column AY2:AY20
If in the column L2:L200 there is 'Associate', if in the row A1:AG1 is 'Word' than count 'Yes' in the column AY2:AY200
 
Upvote 0
If
A1 has the entry = "WORD"
L150 has an entry "associate"
AY53 has an entry "yes"
that counts as a 1
 
Upvote 0
If
A1 has the entry = "WORD"
L150 has an entry "associate"
AY53 has an entry "yes"
that counts as a 1
column AY has in this case 8 'Yes' entries, the outcome should be 8
 
Upvote 0
so if you have
A1 = Word , C1 = Word G1=Word
L150 = Associate , L92 = Accociate , L152 = Associate
AY53 = yes, AY54 = yes, AY55 = yes, AY56 = yes, AY57 = yes, AY58 = yes, AY59 = yes, AY60 = yes,
so
3X WORD in row 1
3X Associate in column L
8x Yes in column AY
so is that 8 ???

what if
3X WORD in row 1
12X Associate in column L
8x Yes in column AY
is that 12 or still 8

not sure i have a solution, just making sure i know the possible entries and outcomes

You have various version of excel in profile and quite a bit of difference in functions so which version does this have to work in ?

A good sample workbook has just 10-20 rows of representative data that has been desensitised. The sample layout accurately matches that of your real data. It also has expected results mocked up, worked examples where required, relevant cells highlighted and a few explanatory notes.

This will possibly enable a quicker and more accurate solution for you.

MrExcel has a tool called “XL2BB” that lets you post samples of your data and will allow us to copy/paste your sample data into our Excel spreadsheets, saving a lot of time.

You can also test to see if it works ok, in the "Test Here" forum.

OR if you cannot get XL2BB to work, or have restrictions on your PC

then put the sample spreadsheet onto a share

I only tend to goto OneDrive, Dropbox or google docs , as I'm never certain of other random share sites and possible virus.
Please make sure you have a representative data sample and also that the data has been desensitised, remember this site is open to anyone with internet access to see - so any sensitive / personal data should be removed

Make sure you set any share or google to share to everyone

if you have any issues with XL2BB, then the "About this Board" is the forum to ask questions about XL2BB
 
Upvote 0
so if you have
A1 = Word , C1 = Word G1=Word
L150 = Associate , L92 = Accociate , L152 = Associate
AY53 = yes, AY54 = yes, AY55 = yes, AY56 = yes, AY57 = yes, AY58 = yes, AY59 = yes, AY60 = yes,
so
3X WORD in row 1
3X Associate in column L
8x Yes in column AY
so is that 8 ???

what if
3X WORD in row 1
12X Associate in column L
8x Yes in column AY
is that 12 or still 8

not sure i have a solution, just making sure i know the possible entries and outcomes

You have various version of excel in profile and quite a bit of difference in functions so which version does this have to work in ?

A good sample workbook has just 10-20 rows of representative data that has been desensitised. The sample layout accurately matches that of your real data. It also has expected results mocked up, worked examples where required, relevant cells highlighted and a few explanatory notes.

This will possibly enable a quicker and more accurate solution for you.

MrExcel has a tool called “XL2BB” that lets you post samples of your data and will allow us to copy/paste your sample data into our Excel spreadsheets, saving a lot of time.

You can also test to see if it works ok, in the "Test Here" forum.

OR if you cannot get XL2BB to work, or have restrictions on your PC

then put the sample spreadsheet onto a share

I only tend to goto OneDrive, Dropbox or google docs , as I'm never certain of other random share sites and possible virus.
Please make sure you have a representative data sample and also that the data has been desensitised, remember this site is open to anyone with internet access to see - so any sensitive / personal data should be removed

Make sure you set any share or google to share to everyone

if you have any issues with XL2BB, then the "About this Board" is the forum to ask questions about XL2BB
1718130325064.png
 
Upvote 0
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
 
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