How do I set up this count?

kmprice710

Board Regular
Joined
Jan 8, 2014
Messages
86
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

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
Are you using xl 365 as your profile shows?
 
Upvote 0
In that case I would suggest you change your profile to show that.

I'm not sure how to get round the 16 digit issue with 2019
 
Upvote 0
In that case I would suggest you change your profile to show that.

I'm not sure how to get round the 16 digit issue with 2019
Often I am at home using my home computer on which I have 365. Should I change my profile every time that I make a post?
 
Upvote 0
No need to change your profile, but clearly state state which version a solution needs to work with.
 
Upvote 0
No need to change your profile, but clearly state state which version a solution needs to work with.

Agreed, I didnt know the digit issue existed either.

Could I solve this by cutting the spreadsheet into smaller bits and then recombining? I have nearly 700000 rows and the first solution that was suggested took 4 hours to reach 5% complete. Maybe I could get the second solution to work on my home computer running 365 if I cut the sheets down? My home computer is a LOT slower than my work one so there is a tradeoff.
 
Upvote 0
The countifs solution will not work on your data as it will only see the 1st 15 digits.
As you can see rows 2 & 11 are being counted as the same value
Fluff.xlsm
ABCDE
1Supplier deliveryAccountDepartmentCount
2111519960084015284077kingk0112
3111519960084015284077hamir0111
4111519960084015084077voskj0111
5111519960084015284077joner0111
6111519960084015284077moorr0111
7111519960084015284077inyar0111
8111519960084015284077freek0111
9111519960084015284077klaia0111
10111519960084015284077carsd0111
11111519960084015084077kingk0112
12111519960084015284077hardm0111
131115199600840152152141reedn0111
141115199600840152152141patta0111
151115199600840152152999collj0211
161115199600840152152141lewim0111
171115199600840152152141guyta0111
181115199600840152152141millc0111
191115199600840152152141jimel0111
201115199600840152152141mandr0111
211115199600840152152141egger0111
221115199600840152152141mujeh0111
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)))
E2:E22E2=COUNTIFS(A:A,A2,B:B,B2,C:C,C2)
 
Upvote 0
The countifs solution will not work on your data as it will only see the 1st 15 digits.
As you can see rows 2 & 11 are being counted as the same value
Fluff.xlsm
ABCDE
1Supplier deliveryAccountDepartmentCount
2111519960084015284077kingk0112
3111519960084015284077hamir0111
4111519960084015084077voskj0111
5111519960084015284077joner0111
6111519960084015284077moorr0111
7111519960084015284077inyar0111
8111519960084015284077freek0111
9111519960084015284077klaia0111
10111519960084015284077carsd0111
11111519960084015084077kingk0112
12111519960084015284077hardm0111
131115199600840152152141reedn0111
141115199600840152152141patta0111
151115199600840152152999collj0211
161115199600840152152141lewim0111
171115199600840152152141guyta0111
181115199600840152152141millc0111
191115199600840152152141jimel0111
201115199600840152152141mandr0111
211115199600840152152141egger0111
221115199600840152152141mujeh0111
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)))
E2:E22E2=COUNTIFS(A:A,A2,B:B,B2,C:C,C2)
But I could download the file on my home computer, open in 365 and do the rows/filter solution?
 
Upvote 0
The formula I supplied will work with 365.
 
Upvote 0

Forum statistics

Threads
1,214,593
Messages
6,120,435
Members
448,961
Latest member
nzskater

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