Counting information in one column based on criteria in another

bwpscmw

New Member
Joined
Oct 11, 2018
Messages
5
Hi

Can you help with the formula that I would need to count the number of occurances there are in columns A, B and C but only if the data in column D for that row is 15 or 30 (I hope that makes sense!)
ABCD
33315
330
333
3

<tbody>
</tbody>

Many thanks
:)
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
Hi & welcome to MrExcel.
How about


Excel 2013/2016
ABCDE
1ABCD
2333153
33301
433310
53
Index
Cell Formulas
RangeFormula
E2=IF(OR(D2={15,30}),COUNTA(A2:C2),"")
 
Upvote 0
Hmmm I need to count the occurances in each column (not each row). When I tried to adapt your formula to accommodate that, it didn't work. :(

Excel 2013/2016
ABCDE
1ABCD
2333153
33301
433310
53

<colgroup><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
So what I am looking for is to find out how many occurances in column A meet the criteria of 15 or 30 in column D.

Is it possible?

Thanks
 
Upvote 0
In that case can you please post some data showing the expected results
 
Upvote 0
In that case can you please post some data showing the expected results


ChildMonTuesWedThursFunding
A
3315
B333
C3.253.2530
D33315
E333
Total2221

<tbody>
</tbody>

Hope this helps. So I want the formula to tell me how many children with funding are attending each day (the 3/3.25 indicates how many hours they attend which I need for other purposes on the spreadsheet).

Does that make sense?

Many thanks
 
Upvote 0
Try


A
B
C
D
E
F
1
Child​
Mon​
Tues​
Wed​
Thurs​
Funding​
2
A​
3​
3​
15​
3
B​
3​
3​
3​
4
C​
3,25​
3.25​
30​
5
D​
3​
3​
3​
15​
6
E​
3​
3​
3​
7
Total​
2​
2​
2​
1​

<tbody>
</tbody>


Formula in B7 copied across
=SUM(COUNTIFS(B$2:B$6,">0",$F$2:$F$6,{15;30}))

M.
 
Last edited:
Upvote 0
Try


A
B
C
D
E
F
1
Child​
Mon​
Tues​
Wed​
Thurs​
Funding​
2
A​
3​
3​
15​
3
B​
3​
3​
3​
4
C​
3,25​
3.25​
30​
5
D​
3​
3​
3​
15​
6
E​
3​
3​
3​
7
Total​
2​
2​
2​
1​

<tbody>
</tbody>


Formula in B7 copied across
=SUM(COUNTIFS(B$2:B$6,">0",$F$2:$F$6,{15;30}))

M.
Awesome, this seems to have done the trick. Many thanks! :):):)
 
Upvote 0

Forum statistics

Threads
1,214,897
Messages
6,122,141
Members
449,066
Latest member
Andyg666

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