How do I set up this count?

kmprice710

Board Regular
Joined
Jan 8, 2014
Messages
87
Office Version
  1. 2019
Platform
  1. Windows
I have a list of customers

Column 1: Account numbers
Column 2: Different departments attached to the account number.
Column 3: Supplier Shipment Numbers

I need to count how many times each specific department is listed under the same supplier shipment number. But I can't count departments without also including the Account number because supplier shipments sometimes include multiple accounts. So I dont want to accidentally count Finance Dept. for Account #101 appearances under transaction # 15 and include Finance Dept. for Account #201 appearances under transaction #15 but those Finance departments are completely separate departments.

How do I set up the count?
 

Attachments

  • Untitled.jpg
    Untitled.jpg
    49.3 KB · Views: 14

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
Using COUNTIFS include all three columns in the formula.
 

Attachments

  • Excel.JPG
    Excel.JPG
    47.6 KB · Views: 12
Upvote 0
Thanks but those counts arent quite right. Finance 101 should be 2. Finance 201 is a different entity.
 
Upvote 0
Can you post some sample data.

MrExcel has a tool called “XL2BB” that lets you post samples of your data that will allow us to copy/paste it to our Excel spreadsheets, so we can work with the same copy of data that you are. Instructions on using this tool can be found here: XL2BB Add-in

Note that there is also a "Test Here” forum on this board. This is a place where you can test using this tool (or any other posting techniques that you want to test) before trying to use those tools in your actual posts.
 
Upvote 0
I got the xls2bb to download and install but the capture section is grayed out and apparently disabled?
 
Upvote 0
kmprice710, good morning.

Herakles' formula works perfectly.

For some strange reason in his example the result is wrong.

Try using it with your data as your example and the formula will give you the result you expect.

I hope I helped with this comment.

I wish you both a great day.
 
Upvote 0
It did not seem to give me the correct counts. The counts for these should be all 1 except for one of the values in column C

EDIT: Apparently the counts were not wrong from the formula but rather the formula did not completely finish because there are 698,000 rows in this spreadsheet. It says 16 threads 1% after 20 minutes. I don't think this solution will work because of the number of rows?

Supplier deliveryAccountDepartmentCount
111519960084015284077kingk01
111519960084015284077hamir01
111519960084015284077voskj01
111519960084015284077joner01
111519960084015284077moorr01
111519960084015284077inyar01
111519960084015284077freek01
111519960084015284077klaia01
111519960084015284077carsd01
111519960084015284077kingk01
111519960084015284077hardm01
1115199600840152152141reedn01
1115199600840152152141patta01
1115199600840152152999collj02
1115199600840152152141lewim01
1115199600840152152141guyta01
1115199600840152152141millc01
1115199600840152152141jimel01
1115199600840152152141mandr01
1115199600840152152141egger01
1115199600840152152141mujeh01
 
Last edited:
Upvote 0
The problem is that your supplier delivery numbers are more than 15 digits.
Try
Fluff.xlsm
ABCD
1Supplier deliveryAccountDepartmentCount
2111519960084015284077kingk012
3111519960084015284077hamir011
4111519960084015284077voskj011
5111519960084015284077joner011
6111519960084015284077moorr011
7111519960084015284077inyar011
8111519960084015284077freek011
9111519960084015284077klaia011
10111519960084015284077carsd011
11111519960084015284077kingk012
12111519960084015284077hardm011
131115199600840152152141reedn011
141115199600840152152141patta011
151115199600840152152999collj021
161115199600840152152141lewim011
171115199600840152152141guyta011
181115199600840152152141millc011
191115199600840152152141jimel011
201115199600840152152141mandr011
211115199600840152152141egger011
221115199600840152152141mujeh011
Lists
Cell Formulas
RangeFormula
D2:D22D2=ROWS(FILTER($A$2:$A$100,($A$2:$A$100=A2)*($B$2:$B$100=B2)*($C$2:$C$100=C2)))
 
Upvote 0
The problem is that your supplier delivery numbers are more than 15 digits.
Try
Fluff.xlsm
ABCD
1Supplier deliveryAccountDepartmentCount
2111519960084015284077kingk012
3111519960084015284077hamir011
4111519960084015284077voskj011
5111519960084015284077joner011
6111519960084015284077moorr011
7111519960084015284077inyar011
8111519960084015284077freek011
9111519960084015284077klaia011
10111519960084015284077carsd011
11111519960084015284077kingk012
12111519960084015284077hardm011
131115199600840152152141reedn011
141115199600840152152141patta011
151115199600840152152999collj021
161115199600840152152141lewim011
171115199600840152152141guyta011
181115199600840152152141millc011
191115199600840152152141jimel011
201115199600840152152141mandr011
211115199600840152152141egger011
221115199600840152152141mujeh011
Lists
Cell Formulas
RangeFormula
D2:D22D2=ROWS(FILTER($A$2:$A$100,($A$2:$A$100=A2)*($B$2:$B$100=B2)*($C$2:$C$100=C2)))

When I type that into D2, I get an error that says "That function isn't valid"
 
Upvote 0

Forum statistics

Threads
1,215,338
Messages
6,124,358
Members
449,155
Latest member
ravioli44

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