Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5
Default Functions- Finding and counting specified text in cell range

I need to identify the correct function to achieve the following task:
Search specified column to find "22087", and count the occurences.

The problem I am having is that the cells within this column often contain
more than one numeric value in each cell. For example, contents of one
single cell may look like this: 22087, 22058, 22064. This cell identifies
the locations of all the jobs a candidate is willing to consider. If a
candidate is willing to consider placement in multiple cities/states, they
are all listed within the cell.
I need to know how many candidates are applying for each location #, and
CountIF only seems to work if the cells contain only one value. Help?


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,339
Default Functions- Finding and counting specified text in cell range

Try:

=SUMPRODUCT(--ISNUMBER(SEARCH("22087",A1:B100)))

HTH

"holliedavis" wrote:

I need to identify the correct function to achieve the following task:
Search specified column to find "22087", and count the occurences.

The problem I am having is that the cells within this column often contain
more than one numeric value in each cell. For example, contents of one
single cell may look like this: 22087, 22058, 22064. This cell identifies
the locations of all the jobs a candidate is willing to consider. If a
candidate is willing to consider placement in multiple cities/states, they
are all listed within the cell.
I need to know how many candidates are applying for each location #, and
CountIF only seems to work if the cells contain only one value. Help?


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5
Default Functions- Finding and counting specified text in cell range

This formula works perfectly... Thank you! One small question, though... I
am searching range G3:G1000 on 4 worsheets for this information. How do I
write the formula to search the same range in multiple sheets?

My formula looks like this so far, but I need to also search sheets 2, 3,
and 4 and end up with a total number.

=SUMPRODUCT(--ISNUMBER(SEARCH("22948",'Sheet 1'!G3:G1003)))

Thanks!!!!

"Toppers" wrote:

Try:

=SUMPRODUCT(--ISNUMBER(SEARCH("22087",A1:B100)))

HTH

"holliedavis" wrote:

I need to identify the correct function to achieve the following task:
Search specified column to find "22087", and count the occurences.

The problem I am having is that the cells within this column often contain
more than one numeric value in each cell. For example, contents of one
single cell may look like this: 22087, 22058, 22064. This cell identifies
the locations of all the jobs a candidate is willing to consider. If a
candidate is willing to consider placement in multiple cities/states, they
are all listed within the cell.
I need to know how many candidates are applying for each location #, and
CountIF only seems to work if the cells contain only one value. Help?


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 111
Default Functions- Finding and counting specified text in cell range

You SHOULD be able to just add a + sign to the end of that formula, copy the
formula (not including the = or the newly added +) and change sheet 1 to
sheet 2. Repeat this for sheets 3 and 4.

Without testing, it should look something like:
=SUMPRODUCT(--ISNUMBER(SEARCH("22948",'Sheet
1'!G3:G1003)))+SUMPRODUCT(--ISNUMBER(SEARCH("22948",'Sheet
2'!G3:G1003)))+SUMPRODUCT(--ISNUMBER(SEARCH("22948",'Sheet
3'!G3:G1003)))+SUMPRODUCT(--ISNUMBER(SEARCH("22948",'Sheet 4'!G3:G1003)))

There may be another way of doing this
Actually, I did test this a little by adding sheet 1 - sheet 4 into my
workbook and putting 22948 somewhere in column g of each. I got 4 (which was
correct in my instance.)
--
Kevin Vaughn


"holliedavis" wrote:

This formula works perfectly... Thank you! One small question, though... I
am searching range G3:G1000 on 4 worsheets for this information. How do I
write the formula to search the same range in multiple sheets?

My formula looks like this so far, but I need to also search sheets 2, 3,
and 4 and end up with a total number.

=SUMPRODUCT(--ISNUMBER(SEARCH("22948",'Sheet 1'!G3:G1003)))

Thanks!!!!

"Toppers" wrote:

Try:

=SUMPRODUCT(--ISNUMBER(SEARCH("22087",A1:B100)))

HTH

"holliedavis" wrote:

I need to identify the correct function to achieve the following task:
Search specified column to find "22087", and count the occurences.

The problem I am having is that the cells within this column often contain
more than one numeric value in each cell. For example, contents of one
single cell may look like this: 22087, 22058, 22064. This cell identifies
the locations of all the jobs a candidate is willing to consider. If a
candidate is willing to consider placement in multiple cities/states, they
are all listed within the cell.
I need to know how many candidates are applying for each location #, and
CountIF only seems to work if the cells contain only one value. Help?


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Functions- Finding and counting specified text in cell range

Hello,

I had the same issue as "holliedavis", where I am trying to count multiple
occurrences within single cells. However, my trouble is that for some reason
I am not getting the correct number! I can see that the correct answer is 7
occurrences of "F", but the formula tells me there are only 4 occurrences. I
must be missing something, because with count I'm trying to do it is correct.
I am using the formula:
=SUMPRODUCT(--ISNUMBER(SEARCH("F",P6:P31)))

A sample cell might be "PPF", blank, or just "F"

Thanks!



"Toppers" wrote:

Try:

=SUMPRODUCT(--ISNUMBER(SEARCH("22087",A1:B100)))

HTH

"holliedavis" wrote:

I need to identify the correct function to achieve the following task:
Search specified column to find "22087", and count the occurences.

The problem I am having is that the cells within this column often contain
more than one numeric value in each cell. For example, contents of one
single cell may look like this: 22087, 22058, 22064. This cell identifies
the locations of all the jobs a candidate is willing to consider. If a
candidate is willing to consider placement in multiple cities/states, they
are all listed within the cell.
I need to know how many candidates are applying for each location #, and
CountIF only seems to work if the cells contain only one value. Help?




  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,339
Default Functions- Finding and counting specified text in cell range

If there can be mulfiple occurences of "F" in ONE cell e.g cell contains "PPF
F PPF" i.e this counts as 3, then try:

=SUMPRODUCT(LEN(P6:P31)-LEN(SUBSTITUTE(P6:P31,"F","")))

If a cell only ever contains ONE "F" then your formula should work: it did
for me.

HTH

"Pinkgoldfish" wrote:

Hello,

I had the same issue as "holliedavis", where I am trying to count multiple
occurrences within single cells. However, my trouble is that for some reason
I am not getting the correct number! I can see that the correct answer is 7
occurrences of "F", but the formula tells me there are only 4 occurrences. I
must be missing something, because with count I'm trying to do it is correct.
I am using the formula:
=SUMPRODUCT(--ISNUMBER(SEARCH("F",P6:P31)))

A sample cell might be "PPF", blank, or just "F"

Thanks!



"Toppers" wrote:

Try:

=SUMPRODUCT(--ISNUMBER(SEARCH("22087",A1:B100)))

HTH

"holliedavis" wrote:

I need to identify the correct function to achieve the following task:
Search specified column to find "22087", and count the occurences.

The problem I am having is that the cells within this column often contain
more than one numeric value in each cell. For example, contents of one
single cell may look like this: 22087, 22058, 22064. This cell identifies
the locations of all the jobs a candidate is willing to consider. If a
candidate is willing to consider placement in multiple cities/states, they
are all listed within the cell.
I need to know how many candidates are applying for each location #, and
CountIF only seems to work if the cells contain only one value. Help?


  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Functions- Finding and counting specified text in cell range

Thank you, works perfect! I'm sure I'll be posting more questions as I get
further into this, thanks for your help!


"Toppers" wrote:

If there can be mulfiple occurences of "F" in ONE cell e.g cell contains "PPF
F PPF" i.e this counts as 3, then try:

=SUMPRODUCT(LEN(P6:P31)-LEN(SUBSTITUTE(P6:P31,"F","")))

If a cell only ever contains ONE "F" then your formula should work: it did
for me.

HTH

"Pinkgoldfish" wrote:

Hello,

I had the same issue as "holliedavis", where I am trying to count multiple
occurrences within single cells. However, my trouble is that for some reason
I am not getting the correct number! I can see that the correct answer is 7
occurrences of "F", but the formula tells me there are only 4 occurrences. I
must be missing something, because with count I'm trying to do it is correct.
I am using the formula:
=SUMPRODUCT(--ISNUMBER(SEARCH("F",P6:P31)))

A sample cell might be "PPF", blank, or just "F"

Thanks!



"Toppers" wrote:

Try:

=SUMPRODUCT(--ISNUMBER(SEARCH("22087",A1:B100)))

HTH

"holliedavis" wrote:

I need to identify the correct function to achieve the following task:
Search specified column to find "22087", and count the occurences.

The problem I am having is that the cells within this column often contain
more than one numeric value in each cell. For example, contents of one
single cell may look like this: 22087, 22058, 22064. This cell identifies
the locations of all the jobs a candidate is willing to consider. If a
candidate is willing to consider placement in multiple cities/states, they
are all listed within the cell.
I need to know how many candidates are applying for each location #, and
CountIF only seems to work if the cells contain only one value. Help?


  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Art Art is offline
external usenet poster
 
Posts: 587
Default Functions- Finding and counting specified text in cell range

How would I be able to see how mwny times a certain word is in a cell, for
example in cell A1 is the text milk bread milk, how can I know that there is
2 times the word milk in the cell?

"Toppers" wrote:

If there can be mulfiple occurences of "F" in ONE cell e.g cell contains "PPF
F PPF" i.e this counts as 3, then try:

=SUMPRODUCT(LEN(P6:P31)-LEN(SUBSTITUTE(P6:P31,"F","")))

If a cell only ever contains ONE "F" then your formula should work: it did
for me.

HTH

"Pinkgoldfish" wrote:

Hello,

I had the same issue as "holliedavis", where I am trying to count multiple
occurrences within single cells. However, my trouble is that for some reason
I am not getting the correct number! I can see that the correct answer is 7
occurrences of "F", but the formula tells me there are only 4 occurrences. I
must be missing something, because with count I'm trying to do it is correct.
I am using the formula:
=SUMPRODUCT(--ISNUMBER(SEARCH("F",P6:P31)))

A sample cell might be "PPF", blank, or just "F"

Thanks!



"Toppers" wrote:

Try:

=SUMPRODUCT(--ISNUMBER(SEARCH("22087",A1:B100)))

HTH

"holliedavis" wrote:

I need to identify the correct function to achieve the following task:
Search specified column to find "22087", and count the occurences.

The problem I am having is that the cells within this column often contain
more than one numeric value in each cell. For example, contents of one
single cell may look like this: 22087, 22058, 22064. This cell identifies
the locations of all the jobs a candidate is willing to consider. If a
candidate is willing to consider placement in multiple cities/states, they
are all listed within the cell.
I need to know how many candidates are applying for each location #, and
CountIF only seems to work if the cells contain only one value. Help?


  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,441
Default Functions- Finding and counting specified text in cell range

Hollie,

Use the array formula (entered uisng Ctrl-Shift-Enter)

=SUM(ISNUMBER(SEARCH(D1,A1:A100))*1)

where D1 contains the location code that you are interested in, and A1:A100 has your list of values.

HTH,
Bernie
MS Excel MVP


"holliedavis" wrote in message
...
I need to identify the correct function to achieve the following task:
Search specified column to find "22087", and count the occurences.

The problem I am having is that the cells within this column often contain
more than one numeric value in each cell. For example, contents of one
single cell may look like this: 22087, 22058, 22064. This cell identifies
the locations of all the jobs a candidate is willing to consider. If a
candidate is willing to consider placement in multiple cities/states, they
are all listed within the cell.
I need to know how many candidates are applying for each location #, and
CountIF only seems to work if the cells contain only one value. Help?




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
Counting within a filtered range Jeff Excel Worksheet Functions 2 June 13th 05 03:33 AM


All times are GMT +1. The time now is 03:12 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"