Count cell in multiple columns based on criteria found in other multiple columns

randomXP

New Member
Joined
Sep 24, 2019
Messages
7
Hello all,

I am having a problem, I thought I got it all figured out with sumproduct function. However, it doesn't work as it should. I am trying to count all the cells containg "2" in columns AM:AO, but only if "1" is found in columns AJ:AL. Ideally a formula that can be further filtered, for example on first row header. So, to summarize, for columns where Zone 1 is found in header and code 1, count all cells with code 2 in columns where Zone 2 is found. Hope I am making myself clear and thanks to all for helping me!

Work_Carr4_traseu_v1.xlsx
AJAKALAMANAO
1Zone 1:AZone 1:BZone 1:CZone 2: AZone 2: BZone 2: C
212
312
412
512
612
713
813
913
10114
1115
1216
13116
1417
1519
161113
171
181
191
201
2112
221
231
2412
2512
2612
rec
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
Do you need this?

Dante Amor
AJAKALAMANAOAP
1Zone 1:AZone 1:BZone 1:CZone 2: AZone 2: BZone 2: C6
212
312
412
512
612
713
813
913
10114
1115
1216
13116
1417
1519
161113
171
181
191
201
21112
221
231
2412
2512
2612
t
Cell Formulas
RangeFormula
AP1AP1=COUNTIFS(AJ:AJ,1,AM:AM,2)+COUNTIFS(AK:AK,1,AN:AN,2)+COUNTIFS(AL:AL,1,AO:AO,2)
 
Upvote 0
I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)
 
Upvote 0

Forum statistics

Threads
1,224,737
Messages
6,180,653
Members
452,992
Latest member
TokugawaIesuma

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