Counting Payments Based on Rows and Columns

rpdonovan

New Member
Joined
Jan 28, 2016
Messages
5
I am trying to count the number of payments (non-zero) made in a fiscal year based on the property. I can do a Countif for each column but there can be a large number of columns (properties) so I would like to be able to create a formula using the whole array that can reference the property and the fiscal year.



yearPeriodNorthWestSouth
201911005075
201961005075
2019905075
202011005075
20206100075
20209100075
20211150075
20216150075
202190075

<tbody>
</tbody>

This is the table I would like to create.

201920202021
North232
West310
South333

<tbody>
</tbody>
 

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


A
B
C
D
E
F
G
H
I
J
1
year​
Period​
North​
West​
South​
2019​
2020​
2021​
2
2019​
1​
100​
50​
75​
North​
2​
3​
2​
3
2019​
6​
100​
50​
75​
West​
3​
1​
0​
4
2019​
9​
0​
50​
75​
South​
3​
3​
3​
5
2020​
1​
100​
50​
75​
6
2020​
6​
100​
0​
75​
7
2020​
9​
100​
0​
75​
8
2021​
1​
150​
0​
75​
9
2021​
6​
150​
0​
75​
10
2021​
9​
0​
0​
75​

Formula in H2 copied across and down
=COUNTIFS($A$2:$A$10,H$1,INDEX($C$2:$E$10,0,MATCH($G2,$C$1:$E$1,0)),">0")

Hope this helps

M.
 
Upvote 0
do a countifs for that

assuming the first table begins on A1 and the second table begins on G1

this is for North 2019
=COUNTIFS(A:A,H1,C:C,">0")
 
Upvote 0

Forum statistics

Threads
1,215,352
Messages
6,124,453
Members
449,161
Latest member
NHOJ

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