Excel 2000 - Formulas and Functions

G

Guest

I have a table that was created in Word 2000 that has been copied into Excel
2000. There is a column (A) that contains a list of countries and I would
like to count the number of times each country appears in column A. In Column
B I typed =countif(a1:a20,"Japan") and the value is returned.

The problem is that some cells in column A contain more than one country,
for example Japan, Italy. If I use 'countif' it returns the value as zero. Is
there another formula I can use?

The desired results is to determine how many times the country is repeated
and then to generate a chart based on the results. This is all text and other
than the 'tally' there are no numbers involved.

Any help would be appreciated.
 
S

slingsh0t

Try this one on for size:
=SUMPRODUCT(--(NOT(ISERROR(FIND("Japan",D3:D8,1)))))
where D3:D8 contains the list of countries. This works when the
countries are listed once per cell, as in your example "Japan, Italy".
"Japan, Italy, Japan" would yield only 1 in the count of Japan.
 
B

Biff

Try one of these if "Japan" may only appear once per cell:

=COUNTIF(A1:A20,"*Japan*")

=SUMPRODUCT(--(ISNUMBER(SEARCH("Japan",A1:A20))))

If "Japan" may appear more than once per cell:

=SUMPRODUCT((LEN(A1:A20)-LEN(SUBSTITUTE(UPPER(A1:A20),"JAPAN",""))))/LEN("Japan")

Biff
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top