Number of instances in column depending on other columns

mattyn

Board Regular
Joined
Apr 20, 2015
Messages
148
Hi again all

Hopefully I can explain this properly.

Worksheet is a large manpower spreadsheet.

Column D (starting at Cell D9 is text of job titles drawn from a drop down list - where the data is held on worksheet Data.
Column M (starting at Cell M9) can be either "Yes" or blank.

In another cell, I need to count how many times Yes appears in Col M when the corresponding cell on Col D has a selected few job titles. I found this online, but it returns TRUE. I want it to count how many "yes" are in Col M.

=OR(AND('Unit Manning'!D9=Data!$C$1,'Unit Manning'!D9=Data!$C$2,'Unit Manning'!D9=Data!$C$8),('Unit Manning'!T9="Yes")

Does this make sense? I cannot use programming (restrictions on work IT system) hence the AND/OR statement above.

Many thanks.
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
Upvote 0
Thank you. This is not so easy - to start simply in the cell i want the answer I tried this:

=COUNTIFS('Unit Manning'!D9:D500,"=Data!C1",'Unit Manning'!T9:T500,"=Yes")

And it gives the answer 0 - when definitely both ranges have the of the criteria - therefoe the answer should be 1.

What am I missing?

Well I tried it without cell referencing - and used text - it seems to work then.
 
Upvote 0

Forum statistics

Threads
1,214,932
Messages
6,122,323
Members
449,077
Latest member
jmsotelo

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