easy one - Counting values

Marcus

New Member
Joined
Mar 21, 2002
Messages
37
Hi,

Should be an easy one, I have a sheet with 64000 items of kit listed against a couple of hundred different contract numbers. Currently in the format:

contract1 kit1
contract1 kit2
contract1 kit3
contract1 kit4
contract2 kit5
contract2 kit6
contract3 kit7
contract3 kit8
contract3 kit9

i.e. this would be 3 contracts, with 4, 2 and 3 items of kit against them. So the question is, how do I count the contract numbers?

Any help would be much appreciated.
Cheers,
Marcus
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
64000 cells... that's a lot.

The best thing to do is to use the morefunc.xll add-in's COUNTDIFF function...

=COUNTDIFF(Range)

where Range houses the contract numbers. One caveat though: The Range should not have formula generated "" (blanks), while empty cells are OK.

Otherwise, array-enter...

=SUM(IF(LEN(Range),1/COUNTIF(Range,Range)))

To array-enter a formula, you need to hit control+shift+enter at the same time, not just enter.

The above formulas produce a count of distinct contract numbers.
 
Upvote 0

Forum statistics

Threads
1,213,532
Messages
6,114,176
Members
448,554
Latest member
Gleisner2

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