counting

MAMIBUSSOL

Board Regular
Joined
Jun 2, 2011
Messages
95
i have collated some data into 1 sheet, the sheet contains purchase transactions, date, supplier totals etc.

i need to count the number of suppliers, making sure I only count each supplier once, the supplier is listed in column B
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
i have collated some data into 1 sheet, the sheet contains purchase transactions, date, supplier totals etc.

i need to count the number of suppliers, making sure I only count each supplier once, the supplier is listed in column B
There are several ways to do this. The best option depends on some factors.

What is the specific range of cells in question? (need to know how big the range is)

Are there any empty cells within the data range that's to be counted?
 
Upvote 0
the suppliers are listed in alphabetical order, so the only blanks will appear at the bottom of the list, however as for the range, there are currently 202 rows of data, but this may change. ie this time round we have 202 rows, however tomorrow might be 100, and wednesday might be 250
 
Upvote 0
the suppliers are listed in alphabetical order, so the only blanks will appear at the bottom of the list, however as for the range, there are currently 202 rows of data, but this may change. ie this time round we have 202 rows, however tomorrow might be 100, and wednesday might be 250
Try this...

=SUMPRODUCT((B2:B250<>"")/COUNTIF(B2:B250,B2:B250&""))
 
Upvote 0
Sorry maybe I should have been clearer, I need to do this using coding

the function does work however the i could have more than the 250, I won't know the number of transactions until I get the files
 
Last edited:
Upvote 0
Sorry maybe I should have been clearer, I need to do this using coding

the function does work however the i could have more than the 250, I won't know the number of transactions until I get the files
OK, just hang in there and maybe someone will respond with the code.

If using the worksheet formula you can simply use a larger range that you know for certain will be enough for your needs. For example, reference down to row 300?

Good luck! :cool:
 
Last edited:
Upvote 0
crusader what is pivot table?

Sorry maybe I should have been clearer, I need to do this using coding
PivotTable is an analysis tool that can be accessed through the Insert -> PivotTable menu in Excel 2007.

I am sure someone will assist you in concocting code to meet your need: I don't have that expertise - yet.
 
Upvote 0

Forum statistics

Threads
1,224,551
Messages
6,179,473
Members
452,915
Latest member
hannnahheileen

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