Count the distinct appearances of Elements in a given row

vsuripeddi used Ask the Experts™

I have an Excel file. It shows the countries of Export in different columns for different months. (See attached Excel file)
We have different passes ( Pass1, Pass2, Pass3, Pass4).

I would like to count the total number of times each country is appearing in a row ( or Pass) . I would  like to populate how many times "Canada" is appearing in a row, "USA" is appearing in a row , Or "Italy" is appearing. If multiple countries are appearing in a cell, they are separated by ";" Otherwise they are single values.

How do I represent the count of each country in the shaded portion( in yellow)?
These countries are not constant and the name of the countries and the number of the countries will keep changing.
Again, there will be only 4 passes. This will not change.

Can some one suggest an Excel VBA macro to obtain this?
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Try attached.
Press the button to run the macro.


Thanks a lit Ejgil Hedegaard

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial