I have a spreadsheet which has in one column a list of offices in Column H. In Column K there is a lst of locations. In these cells the 'location' has a value of for example ( abcdb 1234), however in a cell there may be more than one value eg (abcd 1234, xxxxx 3241,). I need a macro or formula to count the number of locations per office and also a macro or formula to count the number of unique locations per office and the number of unique locations overall. A small example of the spreadsheet. This spreadsheet can have thousands of rows.Any help/guidance is greatly appreciated.
<table style="border-collapse: collapse; width: 225pt;" border="0" cellpadding="0" cellspacing="0" width="301"><col style="width: 80pt;" width="107"> <col style="width: 145pt;" width="194"> <tbody><tr style="height: 14.4pt;" height="19"> <td class="xl65" style="height: 14.4pt; width: 80pt;" height="19" width="107">Column H</td> <td class="xl64" style="width: 145pt;" width="194">Column K</td> </tr> <tr style="height: 14.4pt;" height="19"> <td class="xl65" style="height: 14.4pt;" height="19">Office 1</td> <td class="xl64">abcs 1234</td> </tr> <tr style="height: 14.4pt;" height="19"> <td class="xl66" style="height: 14.4pt; width: 80pt;" height="19" width="107">office 2</td> <td class="xl64">locationa 2435, locationb 6521</td> </tr> <tr style="height: 14.4pt;" height="19"> <td class="xl65" style="height: 14.4pt;" height="19">Office 3</td> <td class="xl64">abcs 1234</td> </tr> <tr style="height: 14.4pt;" height="19"> <td class="xl66" style="height: 14.4pt; width: 80pt;" height="19" width="107">Office 4</td> <td class="xl64">locationa 2435, locationb 6522</td> </tr> <tr style="height: 14.4pt;" height="19"> <td class="xl65" style="height: 14.4pt;" height="19">Office 5</td> <td class="xl64">abcs 1236</td> </tr> <tr style="height: 14.4pt;" height="19"> <td class="xl65" style="height: 14.4pt;" height="19">Office 1</td> <td class="xl64">locationa 2435, locationb 6522</td></tr></tbody></table>
<table style="border-collapse: collapse; width: 225pt;" border="0" cellpadding="0" cellspacing="0" width="301"><col style="width: 80pt;" width="107"> <col style="width: 145pt;" width="194"> <tbody><tr style="height: 14.4pt;" height="19"> <td class="xl65" style="height: 14.4pt; width: 80pt;" height="19" width="107">Column H</td> <td class="xl64" style="width: 145pt;" width="194">Column K</td> </tr> <tr style="height: 14.4pt;" height="19"> <td class="xl65" style="height: 14.4pt;" height="19">Office 1</td> <td class="xl64">abcs 1234</td> </tr> <tr style="height: 14.4pt;" height="19"> <td class="xl66" style="height: 14.4pt; width: 80pt;" height="19" width="107">office 2</td> <td class="xl64">locationa 2435, locationb 6521</td> </tr> <tr style="height: 14.4pt;" height="19"> <td class="xl65" style="height: 14.4pt;" height="19">Office 3</td> <td class="xl64">abcs 1234</td> </tr> <tr style="height: 14.4pt;" height="19"> <td class="xl66" style="height: 14.4pt; width: 80pt;" height="19" width="107">Office 4</td> <td class="xl64">locationa 2435, locationb 6522</td> </tr> <tr style="height: 14.4pt;" height="19"> <td class="xl65" style="height: 14.4pt;" height="19">Office 5</td> <td class="xl64">abcs 1236</td> </tr> <tr style="height: 14.4pt;" height="19"> <td class="xl65" style="height: 14.4pt;" height="19">Office 1</td> <td class="xl64">locationa 2435, locationb 6522</td></tr></tbody></table>