Countifs

omsumo

New Member
Joined
Dec 30, 2023
Messages
15
Office Version
  1. 2010
Platform
  1. Windows
Dears, I have a sheet containing a mini table in different groups, and the formula COUNTIFS gives me a #Value!
1703946383301.png
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
Try this instead
Book1
BCDEFGHIJKLMN
2123345
3
4
5
6
7123345533455
8
93
10
11
12
136
145
Sheet1
Cell Formulas
RangeFormula
C13C13=COUNTIF(C2:H2,C9)+COUNTIF(C7:N7,B14)
 
Upvote 0
Hi and welcome to MrExcel

The criteria ranges must have the same range of columns, for example:

=COUNTIF(C2:H2,C9,C7:H7,B14)

Or:

=COUNTIF(C2:N2,C9,C7:N7,B14)
 
Upvote 0
Man
Try this instead
Book1
BCDEFGHIJKLMN
2123345
3
4
5
6
7123345533455
8
93
10
11
12
136
145
Sheet1
Cell Formulas
RangeFormula
C13C13=COUNTIF(C2:H2,C9)+COUNTIF(C7:N7,B14)
It works, but it gives the wrong number...
 
Upvote 0
Hi and welcome to MrExcel

The criteria ranges must have the same range of columns, for example:

=COUNTIF(C2:H2,C9,C7:H7,B14)

Or:

=COUNTIF(C2:N2,C9,C7:N7,B14)
Thanks Deafr DanteAmor, I can't do it in the same range, it's a multibl table with the same title sorting based on requirements
 
Upvote 0
but it gives the wrong number...

I can't do it in the same range, it's a multibl table with the same title sorting based on requirements


You could give a complete example with the result you expect.
Use the XL2BB tool to put a minisheet with the example. Explain what you need to count and what are the criteria to consider in each range of data.

XL2BB Instructions & Download
 
Upvote 0
Hello and happy new year too!

Try:

Dante Amor
ABCDEFG
1aabbccddeeff
211BrounPinkBlackBlackGrayBroun
322WhiteWhiteBlackPinkWhiteBlack
433PinkPinkGrayGrayBrounGray
544BlackBrounGrayPinkWhiteBroun
655GrayBrounBrounBlackBrounWhite
7
8BrounWhitePinkBlackGray
9aa11111
10bb21200
11cc10022
12dd00221
13ee22001
Hoja1
Cell Formulas
RangeFormula
C9:G13C9=COUNTIF(INDEX($B$2:$G$6,0,MATCH($B9,$B$1:$G$1)),C$8)


😇
 
Upvote 0
Solution
Hello and happy new year too!

Try:

Dante Amor
ABCDEFG
1aabbccddeeff
211BrounPinkBlackBlackGrayBroun
322WhiteWhiteBlackPinkWhiteBlack
433PinkPinkGrayGrayBrounGray
544BlackBrounGrayPinkWhiteBroun
655GrayBrounBrounBlackBrounWhite
7
8BrounWhitePinkBlackGray
9aa11111
10bb21200
11cc10022
12dd00221
13ee22001
Hoja1
Cell Formulas
RangeFormula
C9:G13C9=COUNTIF(INDEX($B$2:$G$6,0,MATCH($B9,$B$1:$G$1)),C$8)


😇
Many Thanks its works perfectly ...👍
 
Upvote 0

Forum statistics

Threads
1,215,069
Messages
6,122,956
Members
449,096
Latest member
Anshu121

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