Countifs with Mutiple Criteria

adrienne0914

Board Regular
Joined
Mar 22, 2018
Messages
57
Office Version
  1. 2016
Platform
  1. Windows
This seems like it would be a simple formula but I keep getting a #Value error when I try it. Trying to get a count based on criteria in Column A in addition to Row 1:

DATA:
LOCATIONP01_2018P02_2018P03_2018P04_2018P05_2016
NO11111
USATL00010
NO00000
NO10010
USBAL11111
NO11111
USLAX01110
USNYC10011

<tbody>
</tbody>


SUMMARY:
P01_2018P02_2018P03_2018P04_2018P05_2016
LANES54474
CAT 122242

<tbody>
</tbody>

I want the first line of the summary to count all of the 1s from each column. I want the second line to only count the 1's if Column A does not equal no AND heading matches. Expect results in summary above. I know I could do a pivot table to get a summary, but I have a monthly report that will be pulling this and data from others into one report. So a pivot table is not possible.
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
Hi,

Will this work for you?


Book1
ABCDEF
1DATA:
2LOCATIONP01_2018P02_2018P03_2018P04_2018P05_2016
3NO11111
4USATL00010
5NO00000
6NO10010
7USBAL11111
8NO11111
9USLAX01110
10USNYC10011
11
12SUMMARY:
13P01_2018P02_2018P03_2018P04_2018P05_2016
14LANES54474
15CAT 122242
Sheet35
Cell Formulas
RangeFormula
B14=SUMPRODUCT(($B2:$F2=B13)*($B3:$F10=1))
B15=SUMPRODUCT(($B2:$F2=B13)*($B3:$F10=1)*($A3:$A10<>"No"))


Formulas copied across.
 
Upvote 0

Forum statistics

Threads
1,214,957
Messages
6,122,466
Members
449,086
Latest member
kwindels

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