countif formula

bwpscmw

New Member
Joined
Oct 11, 2018
Messages
5
Hi

I am struggling to get a countif / countifs formula to work for me. I need to count values in one column if they match a value in another column. Example below:

AgeMonTuesWedThurs
3111
211
311
Total

<tbody>
</tbody>

So I need to know how many children age 2 attend each day and how many children age 3 and above (some might be 4) attend each day (basically to calculate adult/child ratios). I need to use a COUNT formula instead of a SUM formula for a separate (but similar) problem on another sheet.

I have tried =SUM(COUNTIFS(A2:A4,{"3","4"},B2:B4,"")), but it does not seem to be working.

Any ideas?

Many thanks
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
Re: countif formula - help needed

... how many children age 3 and above (some might be 4) attend each day ...

If I understand correctly, assuming the values posted are number values, in B5:

=COUNTIFS($A$2:$A$4,">=3",B2:B4,1)

Copy across
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,186
Messages
6,123,537
Members
449,106
Latest member
techog

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