Count If with multiple criteria and unique values

dixon1983

Board Regular
Joined
Apr 23, 2005
Messages
175
Hi,
I dont know if this is possible or not but thought I'd ask anyway.

I have a sheet of data and want to run a count on the values in Column A with the following criteria:

- If the value in column B is repeated then the value in column A can only be counted once...
- Column C must equal 'M'.


Example:
A.....B.....C
1.....42....M
1.....42....M
2.....41....A
2.....41....M
1.....56....M


In this example 1 would be counted 2 times, and 2 would be counted once.

I have about 15 sheets of data like this and would like a master sheet to look into each sheet and give me a count of each so id prefer to not use the advanced filter => unique variables option if possible.

Any help would be greatly appreciated.

Dixon.
 
In H7 control+shift+enter, not just enter:

=AVERAGE(IF(ISNUMBER(MATCH($B$2:$B$50,$H$2:$H$3,0)),IF($C$2:$C$50>=H4,IF($D$2:$D$50<=H5,IF($F$2:$F$50=H6,$E$2:$E$50)))))

This is a multiconditional average of hours where one of the conditions is "division 1", a particular division.

All done!

Thank you!
 
Upvote 0

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
Could anyone help I need to do a countif with 2/3 criteria based on a unique order number;

A
 
Upvote 0
Could anyone help I need to do a countif with 2/3 criteria based on a unique order number.
I need to count the numbers of companies different methods of travel to work

AB
1MethodCompany name
2Bike test 1
3Walk test 1
4Bus test 2
5Walk test 1
6Car test 1
7Car test 2
8Bike test 1
9Bus test 3
10Bus test 1
11Car test 3
12Cartest 1

<tbody>
</tbody>



My results using the above 3 companies and 10 employees should look like this

Bike/Walk/Car/Bus - 1
Bus/Car - 1
Car - 1

I have a large spreadsheet of close to 1,000 different companies so need to be able to summarise which method(s) is the most popular
 
Last edited by a moderator:
Upvote 0
Both Test2 & test 3 use Bus/Car, but you show only 1 for that & i for Car.
How do you get those results?
 
Upvote 0
I've gone through a number of pages trying to get this to work with the dataset that I'm working on, but to no success! Hoping that someone may be able to help me out.

I'm trying to populate a table with the unique account numbers by channel by month. The data set that I have looks something like this:

CCYYMMAccount #Channel
201701123456Inbound
201701123456Inbound
201701987654Inbound
201701456789Door to Door
201701718293Outbound
201702951753Inbound
201702789123Outbound
201702789123Outbound
201703319782Door to Door
201703319782Door to Door
201704468237Outbound
201704468237Outbound
201704101010Outbound
201704852456Inbound
201704741369Door to Door
201704327869Inbound

<tbody>
</tbody>

My end table ideally would look like this:

Count of Unique Accounts201701201702201703201704
Inbound212
Outbound112
Door to Door111

<tbody>
</tbody>

All the help is greatly appreciated!!
 
Upvote 0
@KamCheng

Count of Unique Accounts201701201702201703201704
Inbound2102
Outbound1102
Door to Door1011

<tbody>
</tbody>

In B2 control+shift+enter, not just enter, copy across, and down:

=SUM(IF(FREQUENCY(IF(Channel=$A2,IF(CCYYMM=B$1,Account)),Account),1))
 
Upvote 0

Forum statistics

Threads
1,215,487
Messages
6,125,079
Members
449,205
Latest member
Healthydogs

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