Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 67
Default Counting multiple values within single cells

Is there a way I can do this?

I have a spreadsheet with a list of branches in cells A1 - A300. I then
have columns of data for each of the past 5 years (ie; B - F) and want to
count the number of instances where particular items occur in each column
(ie; 'apples' or 'oranges', etc). The difficulty is that in some cells
there is more than one item shown ... eg: cell C10 may have 'apples' and
'oranges' - the data is entered this way using 'Alt+Enter' to delimit the 2
items as I don't want rows with empty cells.

Is there a way of counting the items even though they are not in separate
cells? Or is there a better way of approaching this?

Many thanks.


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,393
Default Counting multiple values within single cells

Use =COUNTIF(B1:B500,"*apples*")
This worked for me with "apples pears" in one cell with LF (linefeed)
between the two words.
best wishes
--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

"Terry Bennett" wrote in message
...
Is there a way I can do this?

I have a spreadsheet with a list of branches in cells A1 - A300. I then
have columns of data for each of the past 5 years (ie; B - F) and want to
count the number of instances where particular items occur in each column
(ie; 'apples' or 'oranges', etc). The difficulty is that in some cells
there is more than one item shown ... eg: cell C10 may have 'apples' and
'oranges' - the data is entered this way using 'Alt+Enter' to delimit the
2 items as I don't want rows with empty cells.

Is there a way of counting the items even though they are not in separate
cells? Or is there a better way of approaching this?

Many thanks.



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 67
Default Counting multiple values within single cells

Thanks Bernard - that partially works. It seems to count the number of
instances of cells that contain the word in question. What I really need is
something that will actually count the number of those words in the whole
column (sometimes the same word can occur twice within a cell).

"Bernard Liengme" wrote in message
...
Use =COUNTIF(B1:B500,"*apples*")
This worked for me with "apples pears" in one cell with LF (linefeed)
between the two words.
best wishes
--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

"Terry Bennett" wrote in message
...
Is there a way I can do this?

I have a spreadsheet with a list of branches in cells A1 - A300. I then
have columns of data for each of the past 5 years (ie; B - F) and want to
count the number of instances where particular items occur in each column
(ie; 'apples' or 'oranges', etc). The difficulty is that in some cells
there is more than one item shown ... eg: cell C10 may have 'apples' and
'oranges' - the data is entered this way using 'Alt+Enter' to delimit the
2 items as I don't want rows with empty cells.

Is there a way of counting the items even though they are not in separate
cells? Or is there a better way of approaching this?

Many thanks.





  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 111
Default Counting multiple values within single cells

This appeared to work for me (counting the number of occurrences of apple in
a1:a8 where sometimes apple occurred more than once in a cell:

=SUMPRODUCT((LEN(A1:A8)-LEN(SUBSTITUTE(A1:A8,"apples","")))/LEN("apples"))

--
Kevin Vaughn


"Terry Bennett" wrote:

Thanks Bernard - that partially works. It seems to count the number of
instances of cells that contain the word in question. What I really need is
something that will actually count the number of those words in the whole
column (sometimes the same word can occur twice within a cell).

"Bernard Liengme" wrote in message
...
Use =COUNTIF(B1:B500,"*apples*")
This worked for me with "apples pears" in one cell with LF (linefeed)
between the two words.
best wishes
--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

"Terry Bennett" wrote in message
...
Is there a way I can do this?

I have a spreadsheet with a list of branches in cells A1 - A300. I then
have columns of data for each of the past 5 years (ie; B - F) and want to
count the number of instances where particular items occur in each column
(ie; 'apples' or 'oranges', etc). The difficulty is that in some cells
there is more than one item shown ... eg: cell C10 may have 'apples' and
'oranges' - the data is entered this way using 'Alt+Enter' to delimit the
2 items as I don't want rows with empty cells.

Is there a way of counting the items even though they are not in separate
cells? Or is there a better way of approaching this?

Many thanks.






  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 67
Default Counting multiple values within single cells

Thanks Kevin - that seems to work well!

"Kevin Vaughn" wrote in message
...
This appeared to work for me (counting the number of occurrences of apple
in
a1:a8 where sometimes apple occurred more than once in a cell:

=SUMPRODUCT((LEN(A1:A8)-LEN(SUBSTITUTE(A1:A8,"apples","")))/LEN("apples"))

--
Kevin Vaughn


"Terry Bennett" wrote:

Thanks Bernard - that partially works. It seems to count the number of
instances of cells that contain the word in question. What I really need
is
something that will actually count the number of those words in the whole
column (sometimes the same word can occur twice within a cell).

"Bernard Liengme" wrote in message
...
Use =COUNTIF(B1:B500,"*apples*")
This worked for me with "apples pears" in one cell with LF (linefeed)
between the two words.
best wishes
--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

"Terry Bennett" wrote in message
...
Is there a way I can do this?

I have a spreadsheet with a list of branches in cells A1 - A300. I
then
have columns of data for each of the past 5 years (ie; B - F) and want
to
count the number of instances where particular items occur in each
column
(ie; 'apples' or 'oranges', etc). The difficulty is that in some
cells
there is more than one item shown ... eg: cell C10 may have 'apples'
and
'oranges' - the data is entered this way using 'Alt+Enter' to delimit
the
2 items as I don't want rows with empty cells.

Is there a way of counting the items even though they are not in
separate
cells? Or is there a better way of approaching this?

Many thanks.










  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 111
Default Counting multiple values within single cells

You're welcome.
--
Kevin Vaughn


"Terry Bennett" wrote:

Thanks Kevin - that seems to work well!

"Kevin Vaughn" wrote in message
...
This appeared to work for me (counting the number of occurrences of apple
in
a1:a8 where sometimes apple occurred more than once in a cell:

=SUMPRODUCT((LEN(A1:A8)-LEN(SUBSTITUTE(A1:A8,"apples","")))/LEN("apples"))

--
Kevin Vaughn


"Terry Bennett" wrote:

Thanks Bernard - that partially works. It seems to count the number of
instances of cells that contain the word in question. What I really need
is
something that will actually count the number of those words in the whole
column (sometimes the same word can occur twice within a cell).

"Bernard Liengme" wrote in message
...
Use =COUNTIF(B1:B500,"*apples*")
This worked for me with "apples pears" in one cell with LF (linefeed)
between the two words.
best wishes
--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

"Terry Bennett" wrote in message
...
Is there a way I can do this?

I have a spreadsheet with a list of branches in cells A1 - A300. I
then
have columns of data for each of the past 5 years (ie; B - F) and want
to
count the number of instances where particular items occur in each
column
(ie; 'apples' or 'oranges', etc). The difficulty is that in some
cells
there is more than one item shown ... eg: cell C10 may have 'apples'
and
'oranges' - the data is entered this way using 'Alt+Enter' to delimit
the
2 items as I don't want rows with empty cells.

Is there a way of counting the items even though they are not in
separate
cells? Or is there a better way of approaching this?

Many thanks.









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
offsetting values of multiple cells! via135 Excel Worksheet Functions 9 July 18th 06 06:15 AM
percenatge increase in values across multiple cells David New Users to Excel 2 June 23rd 06 12:06 AM
How to sum the values of a single cell from multiple worksheets Ratman Excel Worksheet Functions 3 September 20th 05 06:35 PM
Pasting single cells from Word to multiple cells in Excel ASBiss Excel Worksheet Functions 1 February 15th 05 11:47 AM
Counting Cells with multiple criteria.One criteria supporting wild Azhar Saleem Excel Worksheet Functions 1 January 12th 05 10:54 AM


All times are GMT +1. The time now is 02:15 AM.

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

About Us

"It's about Microsoft Excel"