Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8
Default Excel 2000 - Formulas and Functions

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.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6
Default Excel 2000 - Formulas and Functions

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.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,688
Default Excel 2000 - Formulas and Functions

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

"DeeW" wrote in message
...
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.



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8
Default Excel 2000 - Formulas and Functions

I followed your suggestions and they worked. Thanks for your help.

"Biff" wrote:

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

"DeeW" wrote in message
...
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.




  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,688
Default Excel 2000 - Formulas and Functions

You're welcome. Thanks for the feedback!

Biff

"DeeW" wrote in message
...
I followed your suggestions and they worked. Thanks for your help.

"Biff" wrote:

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

"DeeW" wrote in message
...
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.






Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do you print showing formulas in Excel 2000? Kim Excel Discussion (Misc queries) 3 June 16th 08 09:56 PM
Help with Excel Formulas or Functions Containsmiles Excel Discussion (Misc queries) 7 May 23rd 06 11:59 PM
Formulas won't enter into cells in Excel 2000 only as useless data rebelkey Excel Worksheet Functions 1 May 9th 06 01:51 PM
Suddenly cannot calculate functions or formulas in Excel Leon Hairie Excel Worksheet Functions 1 March 1st 05 04:26 PM
How do I get to master Excel functions and formulas? Basabjit Chowdhury Excel Worksheet Functions 3 December 29th 04 08:15 PM


All times are GMT +1. The time now is 07:40 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"