Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 577
Default Using COUNTIF for multiple text data creating a logic statment

To setup the scenario, I have 10 doctors from 15 clinics being tracked on one
spreadsheet. There are three columns I want to count from: Doctor, Clinic,
Gender. I would like to create logic statement to count the total number of
patients a specific doctor sees in relation to a specific clinic. Also how
many patients he sees from a region such as the northern clinics (let's say
clinic A,B,C all designated within the "Clinic" column) and how many of the
total people he sees are from his own clinic.

Relating to gender, I would like to count how many of each gender were seen
at each clinic and how many of each gender were seen for a region.

I am sure that the answer is really a variation of a nestled statement to
answer all of these, but I d not know how to create it. I will list a sample
of the columns below:

Gender Clinic Doctor
Male North A
Female North A
Male South B
Male North B
Female South C
Female East A
Male North A


Total North seen by Doctor A:
Total Non-North seen by Doctor A:
Total North and South, but not East seen by Doctor A:
Total Male seen by North:
Total Male seen by Non-North:
Total Male seen by Doctor A:
Total Male from North seen by Doctor A:
Total Male from Non-North seen by Doctor A:
Total North seen by other than Doctor A:

I'm sure you get my point. Thank you for your help.

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default Using COUNTIF for multiple text data creating a logic statment

See answer in your other post - please do not multi-post (although
this has more detail).

Pete

On Jan 15, 9:43*am, Scott wrote:
To setup the scenario, I have 10 doctors from 15 clinics being tracked on one
spreadsheet. *There are three columns I want to count from: Doctor, Clinic,
Gender. I would like to create logic statement to count the total number of
patients a specific doctor sees in relation to a specific clinic. *Also how
many patients he sees from a region such as the northern clinics (let's say
clinic A,B,C all designated within the "Clinic" column) and how many of the
total people he sees are from his own clinic. *

Relating to gender, I would like to count how many of each gender were seen
at each clinic and how many of each gender were seen for a region.

I am sure that the answer is really a variation of a nestled statement to
answer all of these, but I d not know how to create it. I will list a sample
of the columns below:

Gender * * * * * * Clinic * * * * * * *Doctor

Male * * * * * * * North * * * * * * *A
Female * * * * * North * * * * * * *A
Male * * * * * * * South * * * * * * *B
Male * * * * * * * North * * * * * * *B
Female * * * * * South * * * * * * *C
Female * * * * * East * * * * * * * *A
Male * * * * * * * North * * * * * * *A


Total North seen by Doctor A:
Total Non-North seen by Doctor A:
Total North and South, but not East seen by Doctor A:
Total Male seen by North:
Total Male seen by Non-North:
Total Male seen by Doctor A:
Total Male from North seen by Doctor A:
Total Male from Non-North seen by Doctor A:
Total North seen by other than Doctor A:

I'm sure you get my point. Thank you for your help.


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 577
Default Using COUNTIF for multiple text data creating a logic statment


YES, I thought about the lack of detail in the other post and thought I
would clarify with this one. Thank you


"Pete_UK" wrote:

See answer in your other post - please do not multi-post (although
this has more detail).

Pete

On Jan 15, 9:43 am, Scott wrote:
To setup the scenario, I have 10 doctors from 15 clinics being tracked on one
spreadsheet. There are three columns I want to count from: Doctor, Clinic,
Gender. I would like to create logic statement to count the total number of
patients a specific doctor sees in relation to a specific clinic. Also how
many patients he sees from a region such as the northern clinics (let's say
clinic A,B,C all designated within the "Clinic" column) and how many of the
total people he sees are from his own clinic.

Relating to gender, I would like to count how many of each gender were seen
at each clinic and how many of each gender were seen for a region.

I am sure that the answer is really a variation of a nestled statement to
answer all of these, but I d not know how to create it. I will list a sample
of the columns below:

Gender Clinic Doctor

Male North A
Female North A
Male South B
Male North B
Female South C
Female East A
Male North A


Total North seen by Doctor A:
Total Non-North seen by Doctor A:
Total North and South, but not East seen by Doctor A:
Total Male seen by North:
Total Male seen by Non-North:
Total Male seen by Doctor A:
Total Male from North seen by Doctor A:
Total Male from Non-North seen by Doctor A:
Total North seen by other than Doctor A:

I'm sure you get my point. Thank you for your help.



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 577
Default Using COUNTIF for multiple text data creating a logic statment

I read your post:

Assume that your main data is in column A to C, starting on row 2. Use
cells D1, E1 and F1 to enable you to specify the doctor's name, the
county and the gender respectively, and then put this formula in G1:

=SUMPRODUCT(($A$2:$A$1000=D1)*($B$2:$B$1000=E1)*($ C$2:$C$1000=F1))

Just change the values in D1, E1 and F1 to get a different result. You
can also copy the formula down to count values in D2:F2 etc.

But I forgot to mention that the information is on one sheet and the totals
are on another sheet. Also, I am fairly new to this, so I am not sure if I
am doing this correctly, so here is what I put in:

=SUMPRODUCT(('Monthly USAGE REPORT'!J4:J65536="Johnson*")*('Monthly USAGE
REPORT'!H4:H65536="North*"))

But I did not get the expected results. I used the high lite option when
picking the cells and the program automatically gave me the ! instead of the
$ that you had listed?

To setup the scenario, I have 10 doctors from 15 clinics being tracked on one
spreadsheet. There are three columns I want to count from: Doctor, Clinic,
Gender. I would like to create logic statement to count the total number of
patients a specific doctor sees in relation to a specific clinic. Also how
many patients he sees from a region such as the northern clinics (let's say
clinic A,B,C all designated within the "Clinic" column) and how many of the
total people he sees are from his own clinic.

Relating to gender, I would like to count how many of each gender were seen
at each clinic and how many of each gender were seen for a region.

I am sure that the answer is really a variation of a nestled statement to
answer all of these, but I d not know how to create it. I will list a sample
of the columns below:

Gender Clinic Doctor

Male North-A Johnsonstien
Female North-A Johnsonstien
Male South Billing
Male North -B Billing
Female South Crestofen
Female East Johnsonstien
Male North-A Johnsonstien

Total North seen by Doctor Johnsonstien:
Total Non-North seen by Doctor Johnsonstien:
Total North and South, but not East seen by Doctor Johnsonstien:
Total Male seen by North:
Total Male seen by Non-North:
Total Male seen by Doctor Johnsonstien:
Total Male from North seen by Doctor Johnsonstien:
Total Male from Non-North seen by Doctor Johnsonstien:
Total North seen by other than Doctor Johnsonstien:




  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default Using COUNTIF for multiple text data creating a logic statment

You only need the $ symbols if you are going to copy the formula down
- the ! is used to indicate a sheet name, which you need in this case.
However, you seem to be trying to use an asterisk as a wildcard, and
that won't work in this case - try it like this:

=SUMPRODUCT((LEFT('Monthly USAGE REPORT'!
J4:J65536,7)="Johnson")*(LEFT('Monthly USAGE REPORT'!
H4:H65536,5)="North"))

Do you really need to use almost a complete column?

It would be better to put Johnson and North in other cells on the same
sheet and refer to those cells in the formula.

Hope this helps.

Pete


On Jan 15, 10:37*am, Scott wrote:
I read your post:

Assume that your main data is in column A to C, starting on row 2. Use
cells D1, E1 and F1 to enable you to specify the doctor's name, the
county and the gender respectively, and then put this formula in G1:

=SUMPRODUCT(($A$2:$A$1000=D1)*($B$2:$B$1000=E1)*($ C$2:$C$1000=F1))

Just change the values in D1, E1 and F1 to get a different result. You
can also copy the formula down to count values in D2:F2 etc.

But I forgot to mention that the information is on one sheet and the totals
are on another sheet. *Also, I am fairly new to this, so I am not sure if I
am doing this correctly, so here is what I put in:

=SUMPRODUCT(('Monthly USAGE REPORT'!J4:J65536="Johnson*")*('Monthly USAGE
REPORT'!H4:H65536="North*"))

But I did not get the expected results. *I used the high lite option when
picking the cells and the program automatically gave me the ! instead of the
$ that you had listed?



To setup the scenario, I have 10 doctors from 15 clinics being tracked on one
spreadsheet. *There are three columns I want to count from: Doctor, Clinic,
Gender. I would like to create logic statement to count the total number of
patients a specific doctor sees in relation to a specific clinic. *Also how
many patients he sees from a region such as the northern clinics (let's say
clinic A,B,C all designated within the "Clinic" column) and how many of the
total people he sees are from his own clinic. *


Relating to gender, I would like to count how many of each gender were seen
at each clinic and how many of each gender were seen for a region.


I am sure that the answer is really a variation of a nestled statement to
answer all of these, but I d not know how to create it. I will list a sample
of the columns below:


Gender * * * * * * Clinic * * * * * * *Doctor


Male * * * * * * * North-A * * * *Johnsonstien
Female * * * * * North-A * * * *Johnsonstien
Male * * * * * * * South * * * * * *Billing
Male * * * * * * * North -B * * * Billing
Female * * * * * South * * * * * *Crestofen
Female * * * * * East * * * * * * *Johnsonstien
Male * * * * * * * North-A * * * *Johnsonstien


Total North seen by Doctor *Johnsonstien:
Total Non-North seen by Doctor *Johnsonstien:
Total North and South, but not East seen by Doctor *Johnsonstien:
Total Male seen by North:
Total Male seen by Non-North:
Total Male seen by Doctor *Johnsonstien:
Total Male from North seen by Doctor *Johnsonstien:
Total Male from Non-North seen by Doctor *Johnsonstien:
Total North seen by other than Doctor *Johnsonstien:- Hide quoted text -


- Show quoted text -




  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 577
Default Using COUNTIF for multiple text data creating a logic statment

KK, tried that and it didn't really give me any total numbers seen? not sure
how to better explain it then what I have included?

"Pete_UK" wrote:

You only need the $ symbols if you are going to copy the formula down
- the ! is used to indicate a sheet name, which you need in this case.
However, you seem to be trying to use an asterisk as a wildcard, and
that won't work in this case - try it like this:

=SUMPRODUCT((LEFT('Monthly USAGE REPORT'!
J4:J65536,7)="Johnson")*(LEFT('Monthly USAGE REPORT'!
H4:H65536,5)="North"))

Do you really need to use almost a complete column?

It would be better to put Johnson and North in other cells on the same
sheet and refer to those cells in the formula.

Hope this helps.

Pete


On Jan 15, 10:37 am, Scott wrote:
I read your post:

Assume that your main data is in column A to C, starting on row 2. Use
cells D1, E1 and F1 to enable you to specify the doctor's name, the
county and the gender respectively, and then put this formula in G1:

=SUMPRODUCT(($A$2:$A$1000=D1)*($B$2:$B$1000=E1)*($ C$2:$C$1000=F1))

Just change the values in D1, E1 and F1 to get a different result. You
can also copy the formula down to count values in D2:F2 etc.

But I forgot to mention that the information is on one sheet and the totals
are on another sheet. Also, I am fairly new to this, so I am not sure if I
am doing this correctly, so here is what I put in:

=SUMPRODUCT(('Monthly USAGE REPORT'!J4:J65536="Johnson*")*('Monthly USAGE
REPORT'!H4:H65536="North*"))

But I did not get the expected results. I used the high lite option when
picking the cells and the program automatically gave me the ! instead of the
$ that you had listed?



To setup the scenario, I have 10 doctors from 15 clinics being tracked on one
spreadsheet. There are three columns I want to count from: Doctor, Clinic,
Gender. I would like to create logic statement to count the total number of
patients a specific doctor sees in relation to a specific clinic. Also how
many patients he sees from a region such as the northern clinics (let's say
clinic A,B,C all designated within the "Clinic" column) and how many of the
total people he sees are from his own clinic.


Relating to gender, I would like to count how many of each gender were seen
at each clinic and how many of each gender were seen for a region.


I am sure that the answer is really a variation of a nestled statement to
answer all of these, but I d not know how to create it. I will list a sample
of the columns below:


Gender Clinic Doctor


Male North-A Johnsonstien
Female North-A Johnsonstien
Male South Billing
Male North -B Billing
Female South Crestofen
Female East Johnsonstien
Male North-A Johnsonstien


Total North seen by Doctor Johnsonstien:
Total Non-North seen by Doctor Johnsonstien:
Total North and South, but not East seen by Doctor Johnsonstien:
Total Male seen by North:
Total Male seen by Non-North:
Total Male seen by Doctor Johnsonstien:
Total Male from North seen by Doctor Johnsonstien:
Total Male from Non-North seen by Doctor Johnsonstien:
Total North seen by other than Doctor Johnsonstien:- Hide quoted text -


- Show quoted text -



  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default Using COUNTIF for multiple text data creating a logic statment

Okay, try this variation of the formula:

=SUMPRODUCT(--(LEFT(TRIM('Monthly USAGE REPORT'!J4:J65536),
7)="Johnson"),--(LEFT(TRIM('Monthly USAGE REPORT'!H4:H65536),
5)="North"))

Note the double minus sign before each term. This should give a count
of where the first part of the doctor's name begins with Johnson and
the first part of the clinic begins with North, even if you have
spaces in front of them.

Hope this helps.

Pete

On Jan 15, 11:46*am, Scott wrote:
KK, tried that and it didn't really give me any total numbers seen? *not sure
how to better explain it then what I have included?



"Pete_UK" wrote:
You only need the $ symbols if you are going to copy the formula down
- the ! is used to indicate a sheet name, which you need in this case.
However, you seem to be trying to use an asterisk as a wildcard, and
that won't work in this case - try it like this:


=SUMPRODUCT((LEFT('Monthly USAGE REPORT'!
J4:J65536,7)="Johnson")*(LEFT('Monthly USAGE REPORT'!
H4:H65536,5)="North"))


Do you really need to use almost a complete column?


It would be better to put Johnson and North in other cells on the same
sheet and refer to those cells in the formula.


Hope this helps.


Pete


On Jan 15, 10:37 am, Scott wrote:
I read your post:


Assume that your main data is in column A to C, starting on row 2. Use
cells D1, E1 and F1 to enable you to specify the doctor's name, the
county and the gender respectively, and then put this formula in G1:


=SUMPRODUCT(($A$2:$A$1000=D1)*($B$2:$B$1000=E1)*($ C$2:$C$1000=F1))


Just change the values in D1, E1 and F1 to get a different result. You
can also copy the formula down to count values in D2:F2 etc.


But I forgot to mention that the information is on one sheet and the totals
are on another sheet. *Also, I am fairly new to this, so I am not sure if I
am doing this correctly, so here is what I put in:


=SUMPRODUCT(('Monthly USAGE REPORT'!J4:J65536="Johnson*")*('Monthly USAGE
REPORT'!H4:H65536="North*"))


But I did not get the expected results. *I used the high lite option when
picking the cells and the program automatically gave me the ! instead of the
$ that you had listed?


To setup the scenario, I have 10 doctors from 15 clinics being tracked on one
spreadsheet. *There are three columns I want to count from: Doctor, Clinic,
Gender. I would like to create logic statement to count the total number of
patients a specific doctor sees in relation to a specific clinic.. *Also how
many patients he sees from a region such as the northern clinics (let's say
clinic A,B,C all designated within the "Clinic" column) and how many of the
total people he sees are from his own clinic. *


Relating to gender, I would like to count how many of each gender were seen
at each clinic and how many of each gender were seen for a region.

  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 577
Default Using COUNTIF for multiple text data creating a logic statment

That did not work either.....I'm not sure if you saw the changes I made at
the bottom to the data. Instead of North, it is "North-A, North-B, and so
on"..so it is is multiple values for the North clinic. For instance in the
main data sheet I have placed Dr. Johnsonstien (which is why I used Johnson
with an "*") seeing 4 total people from different areas which all add to his
total patients seen, but they are not all at the same location, yet they are
all from the Northern area. The columns are 3 separate columns, but when the
post is posted, it shoves them all together for some reason? If you take
another look at the data, and the totals I am looking for from the data, it
might be more clear. I am looking to count a number for one doctor from both
several locations that are grouped into one area and also count how many
outside of that area are seen. It is fairly complicated I know, and in the
old spreadsheets I used to use, I could use a logical IF statement, but for
Excel, I am having some difficulty? I do however, greatly appreciate your
help on this.


"Pete_UK" wrote:

Okay, try this variation of the formula:

=SUMPRODUCT(--(LEFT(TRIM('Monthly USAGE REPORT'!J4:J65536),
7)="Johnson"),--(LEFT(TRIM('Monthly USAGE REPORT'!H4:H65536),
5)="North"))

Note the double minus sign before each term. This should give a count
of where the first part of the doctor's name begins with Johnson and
the first part of the clinic begins with North, even if you have
spaces in front of them.

Hope this helps.

Pete

On Jan 15, 11:46 am, Scott wrote:
KK, tried that and it didn't really give me any total numbers seen? not sure
how to better explain it then what I have included?



"Pete_UK" wrote:
You only need the $ symbols if you are going to copy the formula down
- the ! is used to indicate a sheet name, which you need in this case.
However, you seem to be trying to use an asterisk as a wildcard, and
that won't work in this case - try it like this:


=SUMPRODUCT((LEFT('Monthly USAGE REPORT'!
J4:J65536,7)="Johnson")*(LEFT('Monthly USAGE REPORT'!
H4:H65536,5)="North"))


Do you really need to use almost a complete column?


It would be better to put Johnson and North in other cells on the same
sheet and refer to those cells in the formula.


Hope this helps.


Pete


On Jan 15, 10:37 am, Scott wrote:
I read your post:


Assume that your main data is in column A to C, starting on row 2. Use
cells D1, E1 and F1 to enable you to specify the doctor's name, the
county and the gender respectively, and then put this formula in G1:


=SUMPRODUCT(($A$2:$A$1000=D1)*($B$2:$B$1000=E1)*($ C$2:$C$1000=F1))


Just change the values in D1, E1 and F1 to get a different result. You
can also copy the formula down to count values in D2:F2 etc.


But I forgot to mention that the information is on one sheet and the totals
are on another sheet. Also, I am fairly new to this, so I am not sure if I
am doing this correctly, so here is what I put in:


=SUMPRODUCT(('Monthly USAGE REPORT'!J4:J65536="Johnson*")*('Monthly USAGE
REPORT'!H4:H65536="North*"))


But I did not get the expected results. I used the high lite option when
picking the cells and the program automatically gave me the ! instead of the
$ that you had listed?


To setup the scenario, I have 10 doctors from 15 clinics being tracked on one
spreadsheet. There are three columns I want to count from: Doctor, Clinic,
Gender. I would like to create logic statement to count the total number of
patients a specific doctor sees in relation to a specific clinic.. Also how
many patients he sees from a region such as the northern clinics (let's say
clinic A,B,C all designated within the "Clinic" column) and how many of the
total people he sees are from his own clinic.


Relating to gender, I would like to count how many of each gender were seen
at each clinic and how many of each gender were seen for a region.


I am sure that the answer is really a variation of a nestled statement to
answer all of these, but I d not know how to create it. I will list a sample
of the columns below:


Gender Clinic Doctor


Male North-A Johnsonstien
Female North-A Johnsonstien
Male South Billing
Male North -B Billing
Female South Crestofen
Female East Johnsonstien
Male North-A Johnsonstien


Total North seen by Doctor Johnsonstien:
Total Non-North seen by Doctor Johnsonstien:
Total North and South, but not East seen by Doctor Johnsonstien:
Total Male seen by North:
Total Male seen by Non-North:
Total Male seen by Doctor Johnsonstien:
Total Male from North seen by Doctor Johnsonstien:
Total Male from Non-North seen by Doctor Johnsonstien:
Total North seen by other than Doctor Johnsonstien:- Hide quoted text -


- Show quoted text -- Hide quoted text -


- Show quoted text -



  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default Using COUNTIF for multiple text data creating a logic statment

I'm sorry it didn't work, although it doesn't help to diagnose the
problem(s) by stating just that - what results did you get, and what
did you expect to get? Perhaps you can try it out on just a sub-set of
your data and try to figure out what is happening.

Pete

On Jan 15, 2:03*pm, Scott wrote:
That did not work either.....I'm not sure if you saw the changes I made at
the bottom to the data. *Instead of North, it is "North-A, North-B, and so
on"..so it is is multiple values for the North clinic. *For instance in the
main data sheet I have placed Dr. *Johnsonstien (which is why I used Johnson
with an "*") seeing 4 total people from different areas which all add to his
total patients seen, but they are not all at the same location, yet they are
all from the Northern area. *The columns are 3 separate columns, but when the
post is posted, it shoves them all together for some reason? *If you take
another look at the data, and the totals I am looking for from the data, it
might be more clear. *I am looking to count a number for one doctor from both
several locations that are grouped into one area and also count how many
outside of that area are seen. *It is fairly complicated I know, and in the
old spreadsheets I used to use, I could use a logical IF statement, but for
Excel, I am having some difficulty? I do however, greatly appreciate your
help on this.



"Pete_UK" wrote:
Okay, try this variation of the formula:


=SUMPRODUCT(--(LEFT(TRIM('Monthly USAGE REPORT'!J4:J65536),
7)="Johnson"),--(LEFT(TRIM('Monthly USAGE REPORT'!H4:H65536),
5)="North"))


Note the double minus sign before each term. This should give a count
of where the first part of the doctor's name begins with Johnson and
the first part of the clinic begins with North, even if you have
spaces in front of them.


Hope this helps.


Pete


On Jan 15, 11:46 am, Scott wrote:
KK, tried that and it didn't really give me any total numbers seen? *not sure
how to better explain it then what I have included?


"Pete_UK" wrote:
You only need the $ symbols if you are going to copy the formula down
- the ! is used to indicate a sheet name, which you need in this case.
However, you seem to be trying to use an asterisk as a wildcard, and
that won't work in this case - try it like this:


=SUMPRODUCT((LEFT('Monthly USAGE REPORT'!
J4:J65536,7)="Johnson")*(LEFT('Monthly USAGE REPORT'!
H4:H65536,5)="North"))


Do you really need to use almost a complete column?


It would be better to put Johnson and North in other cells on the same
sheet and refer to those cells in the formula.


Hope this helps.


Pete


On Jan 15, 10:37 am, Scott wrote:
I read your post:


Assume that your main data is in column A to C, starting on row 2. Use
cells D1, E1 and F1 to enable you to specify the doctor's name, the
county and the gender respectively, and then put this formula in G1:


=SUMPRODUCT(($A$2:$A$1000=D1)*($B$2:$B$1000=E1)*($ C$2:$C$1000=F1))


Just change the values in D1, E1 and F1 to get a different result. You
can also copy the formula down to count values in D2:F2 etc.


But I forgot to mention that the information is on one sheet and the totals
are on another sheet. *Also, I am fairly new to this, so I am not sure if I
am doing this correctly, so here is what I put in:


=SUMPRODUCT(('Monthly USAGE REPORT'!J4:J65536="Johnson*")*('Monthly USAGE
REPORT'!H4:H65536="North*"))


But I did not get the expected results. *I used the high lite option when
picking the cells and the program automatically gave me the ! instead of the
$ that you had listed?


To setup the scenario, I have 10 doctors from 15 clinics being tracked on one
spreadsheet. *There are three columns I want to count from: Doctor, Clinic,
Gender. I would like to create logic statement to count the total number of
patients a specific doctor sees in relation to a specific clinic.. *Also how
many patients he sees from a region such as the northern clinics (let's say
clinic A,B,C all designated within the "Clinic" column) and how many of the
total people he sees are from his own clinic. *


Relating to gender, I would like to count how many of each gender were seen
at each clinic and how many of each gender were seen for a region.


I am sure that the answer is really a variation of a nestled statement to
answer all of these, but I d not know how to create it. I will list a sample
of the columns below:


Gender * * * * * * Clinic * * * * * * *Doctor


Male * * * * * * * North-A * * * *Johnsonstien
Female * * * * * North-A * * * *Johnsonstien
Male * * * * * * * South * * * * * *Billing
Male * * * * * * * North -B * * * Billing
Female * * * * * South * * * * * *Crestofen
Female * * * * * East * * * * * * *Johnsonstien
Male * * * * * * * North-A * * * *Johnsonstien


Total North seen by Doctor *Johnsonstien:
Total Non-North seen by Doctor *Johnsonstien:
Total North and South, but not East seen by Doctor *Johnsonstien:
Total Male seen by North:
Total Male seen by Non-North:
Total Male seen by Doctor *Johnsonstien:
Total Male from North seen by Doctor *Johnsonstien:
Total Male from Non-North seen by Doctor *Johnsonstien:
Total North seen by other than Doctor *Johnsonstien:- Hide quoted text -


- Show quoted text -- Hide quoted text -


- Show quoted text -- Hide quoted text -


- Show quoted text -


  #10   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 577
Default Using COUNTIF for multiple text data creating a logic statment

OKAY, let's try a simpler process. Hoe do I write a formula to count the
number of time that a single text variable in one column matches multiple
text variables in another colmn:

Fruits Source
Apple Tree
Peach Tree
Cherry Tree
Blue Berry Bush


So the total nymber of fruits (Apple, Peach, Cherry) that grow on a "Tree" = 3


"Pete_UK" wrote:

I'm sorry it didn't work, although it doesn't help to diagnose the
problem(s) by stating just that - what results did you get, and what
did you expect to get? Perhaps you can try it out on just a sub-set of
your data and try to figure out what is happening.

Pete

On Jan 15, 2:03 pm, Scott wrote:
That did not work either.....I'm not sure if you saw the changes I made at
the bottom to the data. Instead of North, it is "North-A, North-B, and so
on"..so it is is multiple values for the North clinic. For instance in the
main data sheet I have placed Dr. Johnsonstien (which is why I used Johnson
with an "*") seeing 4 total people from different areas which all add to his
total patients seen, but they are not all at the same location, yet they are
all from the Northern area. The columns are 3 separate columns, but when the
post is posted, it shoves them all together for some reason? If you take
another look at the data, and the totals I am looking for from the data, it
might be more clear. I am looking to count a number for one doctor from both
several locations that are grouped into one area and also count how many
outside of that area are seen. It is fairly complicated I know, and in the
old spreadsheets I used to use, I could use a logical IF statement, but for
Excel, I am having some difficulty? I do however, greatly appreciate your
help on this.



"Pete_UK" wrote:
Okay, try this variation of the formula:


=SUMPRODUCT(--(LEFT(TRIM('Monthly USAGE REPORT'!J4:J65536),
7)="Johnson"),--(LEFT(TRIM('Monthly USAGE REPORT'!H4:H65536),
5)="North"))


Note the double minus sign before each term. This should give a count
of where the first part of the doctor's name begins with Johnson and
the first part of the clinic begins with North, even if you have
spaces in front of them.


Hope this helps.


Pete


On Jan 15, 11:46 am, Scott wrote:
KK, tried that and it didn't really give me any total numbers seen? not sure
how to better explain it then what I have included?


"Pete_UK" wrote:
You only need the $ symbols if you are going to copy the formula down
- the ! is used to indicate a sheet name, which you need in this case.
However, you seem to be trying to use an asterisk as a wildcard, and
that won't work in this case - try it like this:


=SUMPRODUCT((LEFT('Monthly USAGE REPORT'!
J4:J65536,7)="Johnson")*(LEFT('Monthly USAGE REPORT'!
H4:H65536,5)="North"))


Do you really need to use almost a complete column?


It would be better to put Johnson and North in other cells on the same
sheet and refer to those cells in the formula.


Hope this helps.


Pete


On Jan 15, 10:37 am, Scott wrote:
I read your post:


Assume that your main data is in column A to C, starting on row 2. Use
cells D1, E1 and F1 to enable you to specify the doctor's name, the
county and the gender respectively, and then put this formula in G1:


=SUMPRODUCT(($A$2:$A$1000=D1)*($B$2:$B$1000=E1)*($ C$2:$C$1000=F1))


Just change the values in D1, E1 and F1 to get a different result. You
can also copy the formula down to count values in D2:F2 etc.


But I forgot to mention that the information is on one sheet and the totals
are on another sheet. Also, I am fairly new to this, so I am not sure if I
am doing this correctly, so here is what I put in:


=SUMPRODUCT(('Monthly USAGE REPORT'!J4:J65536="Johnson*")*('Monthly USAGE
REPORT'!H4:H65536="North*"))


But I did not get the expected results. I used the high lite option when
picking the cells and the program automatically gave me the ! instead of the
$ that you had listed?


To setup the scenario, I have 10 doctors from 15 clinics being tracked on one
spreadsheet. There are three columns I want to count from: Doctor, Clinic,
Gender. I would like to create logic statement to count the total number of
patients a specific doctor sees in relation to a specific clinic.. Also how
many patients he sees from a region such as the northern clinics (let's say
clinic A,B,C all designated within the "Clinic" column) and how many of the
total people he sees are from his own clinic.


Relating to gender, I would like to count how many of each gender were seen
at each clinic and how many of each gender were seen for a region.


I am sure that the answer is really a variation of a nestled statement to
answer all of these, but I d not know how to create it. I will list a sample
of the columns below:


Gender Clinic Doctor


Male North-A Johnsonstien
Female North-A Johnsonstien
Male South Billing
Male North -B Billing
Female South Crestofen
Female East Johnsonstien
Male North-A Johnsonstien


Total North seen by Doctor Johnsonstien:
Total Non-North seen by Doctor Johnsonstien:
Total North and South, but not East seen by Doctor Johnsonstien:
Total Male seen by North:
Total Male seen by Non-North:
Total Male seen by Doctor Johnsonstien:
Total Male from North seen by Doctor Johnsonstien:
Total Male from Non-North seen by Doctor Johnsonstien:
Total North seen by other than Doctor Johnsonstien:- Hide quoted text -


- Show quoted text -- Hide quoted text -


- Show quoted text -- Hide quoted text -


- Show quoted text -





  #11   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default Using COUNTIF for multiple text data creating a logic statment

It's not quite the same situation - with a single variable you can use
COUNTIF like this:

=COUNTIF(B1:B10,"Tree")

but you will be having 2 or more variables, which is why you have to
use SUMPRODUCT.

Imagine you have:

Apple Red Tree
Apple Green Tree
Peach Red Tree
Plum Red Tree
Damson Black Tree
Greengage Green Tree
Grape Green Bush
Grape Red Bush
Cherry Red Tree
Blackcurrant Black Bush
Blueberry Blue Bush
Blackberry Black Bush
Redcurrant Red Bush

=SUMPRODUCT((B1:B13="Red")*(C1:C13="Tree"))

will count how many are red and grow from a tree. The following will
count how many are red growing on a tree where the name begins with a
P:

=SUMPRODUCT((LEFT(A1:A13,1)="P")*(B1:B13="Red")*(C 1:C13="Tree"))

You can string many more conditions together in this format of:

=SUMPRODUCT((condition1)*(condition2)*(condition3) *(condition4))
or
=SUMPRODUCT(--(condition1),--(condition2),--(condition3),--
(condition4))

to get a count, where the double unary minus coerces the True/False
values to 1 or 0.

Does this help?

Pete

On Jan 15, 5:15*pm, Scott wrote:
OKAY, let's try a simpler process. *Hoe do I write a formula to count the
number of time that a single text variable in one column matches multiple
text variables in another colmn:

* * * * * * * * * *Fruits * * * * * * * * * * * Source

* * * Apple * * * * * * * * * * * * * * * * Tree
* * * Peach * * * * * * * * * * * * * * * * Tree
* * * Cherry * * * * * * * * * * * * * * * *Tree
* * * Blue Berry * * * * * * * * * * * * *Bush


So the total nymber of fruits (Apple, Peach, Cherry) that grow on a "Tree" = 3



"Pete_UK" wrote:
I'm sorry it didn't work, although it doesn't help to diagnose the
problem(s) by stating just that - what results did you get, and what
did you expect to get? Perhaps you can try it out on just a sub-set of
your data and try to figure out what is happening.


Pete


On Jan 15, 2:03 pm, Scott wrote:
That did not work either.....I'm not sure if you saw the changes I made at
the bottom to the data. *Instead of North, it is "North-A, North-B, and so
on"..so it is is multiple values for the North clinic. *For instance in the
main data sheet I have placed Dr. *Johnsonstien (which is why I used Johnson
with an "*") seeing 4 total people from different areas which all add to his
total patients seen, but they are not all at the same location, yet they are
all from the Northern area. *The columns are 3 separate columns, but when the
post is posted, it shoves them all together for some reason? *If you take
another look at the data, and the totals I am looking for from the data, it
might be more clear. *I am looking to count a number for one doctor from both
several locations that are grouped into one area and also count how many
outside of that area are seen. *It is fairly complicated I know, and in the
old spreadsheets I used to use, I could use a logical IF statement, but for
Excel, I am having some difficulty? I do however, greatly appreciate your
help on this.


"Pete_UK" wrote:
Okay, try this variation of the formula:


=SUMPRODUCT(--(LEFT(TRIM('Monthly USAGE REPORT'!J4:J65536),
7)="Johnson"),--(LEFT(TRIM('Monthly USAGE REPORT'!H4:H65536),
5)="North"))


Note the double minus sign before each term. This should give a count
of where the first part of the doctor's name begins with Johnson and
the first part of the clinic begins with North, even if you have
spaces in front of them.


Hope this helps.


Pete


On Jan 15, 11:46 am, Scott wrote:
KK, tried that and it didn't really give me any total numbers seen? *not sure
how to better explain it then what I have included?


"Pete_UK" wrote:
You only need the $ symbols if you are going to copy the formula down
- the ! is used to indicate a sheet name, which you need in this case.
However, you seem to be trying to use an asterisk as a wildcard, and
that won't work in this case - try it like this:


=SUMPRODUCT((LEFT('Monthly USAGE REPORT'!
J4:J65536,7)="Johnson")*(LEFT('Monthly USAGE REPORT'!
H4:H65536,5)="North"))


Do you really need to use almost a complete column?


It would be better to put Johnson and North in other cells on the same
sheet and refer to those cells in the formula.


Hope this helps.


Pete


On Jan 15, 10:37 am, Scott wrote:
I read your post:


Assume that your main data is in column A to C, starting on row 2. Use
cells D1, E1 and F1 to enable you to specify the doctor's name, the
county and the gender respectively, and then put this formula in G1:


=SUMPRODUCT(($A$2:$A$1000=D1)*($B$2:$B$1000=E1)*($ C$2:$C$1000=F1))


Just change the values in D1, E1 and F1 to get a different result. You
can also copy the formula down to count values in D2:F2 etc.


But I forgot to mention that the information is on one sheet and the totals
are on another sheet. *Also, I am fairly new to this, so I am not sure if I
am doing this correctly, so here is what I put in:


=SUMPRODUCT(('Monthly USAGE REPORT'!J4:J65536="Johnson*")*('Monthly USAGE
REPORT'!H4:H65536="North*"))


But I did not get the expected results. *I used the high lite option when
picking the cells and the program automatically gave me the ! instead of the
$ that you had listed?


To setup the scenario, I have 10 doctors from 15 clinics being tracked on one
spreadsheet. *There are three columns I want to count from: Doctor, Clinic,
Gender. I would like to create logic statement to count the total number of
patients a specific doctor sees in relation to a specific clinic.. *Also how
many patients he sees from a region such as the northern clinics (let's say
clinic A,B,C all designated within the "Clinic" column) and how many of the
total people he sees are from his own clinic. *


Relating to gender, I would like to count how many of each gender were seen
at each clinic and how many of each gender were seen for a region.


I am sure that the answer is really a variation of a nestled statement to
answer all of these, but I d not know how to create it. I will list a sample
of the columns below:


Gender * * * * * * Clinic * * * * * * *Doctor


Male * * * * * * * North-A * * * *Johnsonstien
Female * * * * * North-A * * * *Johnsonstien
Male * * * * * * * South * * * * * *Billing
Male * * * * * * * North -B * * * Billing
Female * * * * * South * * * * * *Crestofen
Female * * * * * East * * * * * * *Johnsonstien
Male * * * * * * * North-A * * * *Johnsonstien


Total North seen by Doctor *Johnsonstien:
Total Non-North seen by Doctor *Johnsonstien:
Total North and South, but not East seen by Doctor *Johnsonstien:
Total Male seen by North:
Total Male seen by Non-North:
Total Male seen by Doctor *Johnsonstien:
Total Male from North seen by Doctor *Johnsonstien:
Total Male from Non-North seen by Doctor *Johnsonstien:
Total North seen by other than Doctor *Johnsonstien:- Hide quoted text -


- Show quoted text -- Hide quoted text -


- Show quoted text -- Hide quoted text -


- Show quoted text -- Hide quoted text -


- Show quoted text -


  #12   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 577
Default Using COUNTIF for multiple text data creating a logic statment

I think we got it. I just need a little more education and I think I can
roll hard!!!!!!! Okay, I understand the (Left(range,1)="P") part is counting
from the left one space and looking for a "P". I have several varying lenght
descriptors that end in "EVAC" and I would like to use "EVAC" as the
variable. I tired to use(RIGHT(Range,5)="EVAC") which if it should have
worked would have given me 4 hits, but I got a Zero with no error. I was
combining this with the "Sumproduct" Function to look something like this:

=SUMPRODUCT((Right(range,5)="EVAC")*(LEFT(range,2) ="He"))

this was supposed to count number of EVAC from Heranginy Hospital. What I
am asking is how to count from the end if that is possible.

In addition can you tell me if the inside "" text is case sensative or not?

Thanks again...............

"Pete_UK" wrote:

It's not quite the same situation - with a single variable you can use
COUNTIF like this:

=COUNTIF(B1:B10,"Tree")

but you will be having 2 or more variables, which is why you have to
use SUMPRODUCT.

Imagine you have:

Apple Red Tree
Apple Green Tree
Peach Red Tree
Plum Red Tree
Damson Black Tree
Greengage Green Tree
Grape Green Bush
Grape Red Bush
Cherry Red Tree
Blackcurrant Black Bush
Blueberry Blue Bush
Blackberry Black Bush
Redcurrant Red Bush

=SUMPRODUCT((B1:B13="Red")*(C1:C13="Tree"))

will count how many are red and grow from a tree. The following will
count how many are red growing on a tree where the name begins with a
P:

=SUMPRODUCT((LEFT(A1:A13,1)="P")*(B1:B13="Red")*(C 1:C13="Tree"))

You can string many more conditions together in this format of:

=SUMPRODUCT((condition1)*(condition2)*(condition3) *(condition4))
or
=SUMPRODUCT(--(condition1),--(condition2),--(condition3),--
(condition4))

to get a count, where the double unary minus coerces the True/False
values to 1 or 0.

Does this help?

Pete

On Jan 15, 5:15 pm, Scott wrote:
OKAY, let's try a simpler process. Hoe do I write a formula to count the
number of time that a single text variable in one column matches multiple
text variables in another colmn:

Fruits Source

Apple Tree
Peach Tree
Cherry Tree
Blue Berry Bush


So the total nymber of fruits (Apple, Peach, Cherry) that grow on a "Tree" = 3



"Pete_UK" wrote:
I'm sorry it didn't work, although it doesn't help to diagnose the
problem(s) by stating just that - what results did you get, and what
did you expect to get? Perhaps you can try it out on just a sub-set of
your data and try to figure out what is happening.


Pete


On Jan 15, 2:03 pm, Scott wrote:
That did not work either.....I'm not sure if you saw the changes I made at
the bottom to the data. Instead of North, it is "North-A, North-B, and so
on"..so it is is multiple values for the North clinic. For instance in the
main data sheet I have placed Dr. Johnsonstien (which is why I used Johnson
with an "*") seeing 4 total people from different areas which all add to his
total patients seen, but they are not all at the same location, yet they are
all from the Northern area. The columns are 3 separate columns, but when the
post is posted, it shoves them all together for some reason? If you take
another look at the data, and the totals I am looking for from the data, it
might be more clear. I am looking to count a number for one doctor from both
several locations that are grouped into one area and also count how many
outside of that area are seen. It is fairly complicated I know, and in the
old spreadsheets I used to use, I could use a logical IF statement, but for
Excel, I am having some difficulty? I do however, greatly appreciate your
help on this.


"Pete_UK" wrote:
Okay, try this variation of the formula:


=SUMPRODUCT(--(LEFT(TRIM('Monthly USAGE REPORT'!J4:J65536),
7)="Johnson"),--(LEFT(TRIM('Monthly USAGE REPORT'!H4:H65536),
5)="North"))


Note the double minus sign before each term. This should give a count
of where the first part of the doctor's name begins with Johnson and
the first part of the clinic begins with North, even if you have
spaces in front of them.


Hope this helps.


Pete


On Jan 15, 11:46 am, Scott wrote:
KK, tried that and it didn't really give me any total numbers seen? not sure
how to better explain it then what I have included?


"Pete_UK" wrote:
You only need the $ symbols if you are going to copy the formula down
- the ! is used to indicate a sheet name, which you need in this case.
However, you seem to be trying to use an asterisk as a wildcard, and
that won't work in this case - try it like this:


=SUMPRODUCT((LEFT('Monthly USAGE REPORT'!
J4:J65536,7)="Johnson")*(LEFT('Monthly USAGE REPORT'!
H4:H65536,5)="North"))


Do you really need to use almost a complete column?


It would be better to put Johnson and North in other cells on the same
sheet and refer to those cells in the formula.


Hope this helps.


Pete


On Jan 15, 10:37 am, Scott wrote:
I read your post:


Assume that your main data is in column A to C, starting on row 2. Use
cells D1, E1 and F1 to enable you to specify the doctor's name, the
county and the gender respectively, and then put this formula in G1:


=SUMPRODUCT(($A$2:$A$1000=D1)*($B$2:$B$1000=E1)*($ C$2:$C$1000=F1))


Just change the values in D1, E1 and F1 to get a different result. You
can also copy the formula down to count values in D2:F2 etc.


But I forgot to mention that the information is on one sheet and the totals
are on another sheet. Also, I am fairly new to this, so I am not sure if I
am doing this correctly, so here is what I put in:


=SUMPRODUCT(('Monthly USAGE REPORT'!J4:J65536="Johnson*")*('Monthly USAGE
REPORT'!H4:H65536="North*"))


But I did not get the expected results. I used the high lite option when
picking the cells and the program automatically gave me the ! instead of the
$ that you had listed?


To setup the scenario, I have 10 doctors from 15 clinics being tracked on one
spreadsheet. There are three columns I want to count from: Doctor, Clinic,
Gender. I would like to create logic statement to count the total number of
patients a specific doctor sees in relation to a specific clinic.. Also how
many patients he sees from a region such as the northern clinics (let's say
clinic A,B,C all designated within the "Clinic" column) and how many of the
total people he sees are from his own clinic.


Relating to gender, I would like to count how many of each gender were seen
at each clinic and how many of each gender were seen for a region.


I am sure that the answer is really a variation of a nestled statement to
answer all of these, but I d not know how to create it. I will list a sample
of the columns below:


Gender Clinic Doctor


Male North-A Johnsonstien
Female North-A Johnsonstien
Male South Billing
Male North -B Billing
Female South Crestofen
Female East Johnsonstien
Male North-A Johnsonstien


Total North seen by Doctor Johnsonstien:
Total Non-North seen by Doctor Johnsonstien:
Total North and South, but not East seen by Doctor Johnsonstien:
Total Male seen by North:
Total Male seen by Non-North:
Total Male seen by Doctor Johnsonstien:
Total Male from North seen by Doctor Johnsonstien:
Total Male from Non-North seen by Doctor Johnsonstien:
Total North seen by other than Doctor Johnsonstien:- Hide quoted text -


- Show quoted text -- Hide quoted text -


- Show quoted text -- Hide quoted text -


- Show quoted text -- Hide quoted text -


- Show quoted text -



  #13   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default Using COUNTIF for multiple text data creating a logic statment

EVAC only has 4 characters, whereas your RIGHT function is taking 5,
so they will never match with EVAC - change your 5 to 4.

No, it is not case sensitive - if you wanted it to be then you will
have to incorporate the EXACT function, or you can construct a
function which makes use of FIND (and you will need ISERROR).

Hope this helps - we seem to be getting closer ...

Pete

On Jan 15, 8:02*pm, Scott wrote:
I think we got it. *I just need a little more education and I think I can
roll hard!!!!!!! *Okay, I understand the (Left(range,1)="P") part is counting
from the left one space and looking for a "P". *I have several varying lenght
descriptors that end in "EVAC" and I would like to use "EVAC" as the
variable. *I tired to use(RIGHT(Range,5)="EVAC") which if it should have
worked would have given me 4 hits, but *I got a Zero with no error. *I was
combining this with the "Sumproduct" Function to look something like this:

=SUMPRODUCT((Right(range,5)="EVAC")*(LEFT(range,2) ="He"))

* this was supposed to count number of EVAC from Heranginy Hospital. *What I
am asking is how to count from the end if that is possible. *

In addition can you tell me if the inside "" text is case sensative or not?

Thanks again...............



"Pete_UK" wrote:
It's not quite the same situation - with a single variable you can use
COUNTIF like this:


=COUNTIF(B1:B10,"Tree")


but you will be having 2 or more variables, which is why you have to
use SUMPRODUCT.


Imagine you have:


Apple * * * * * Red * * * Tree
Apple * * * * * Green * *Tree
Peach * * * * *Red * * * Tree
Plum * * * * * *Red * * * Tree
Damson * * * *Black * *Tree
Greengage * *Green * *Tree
Grape * * * * * Green * *Bush
Grape * * * * * Red * * * Bush
Cherry * * * * * Red * * *Tree
Blackcurrant *Black * *Bush
Blueberry * * * Blue * * Bush
Blackberry * * Black * *Bush
Redcurrant * * Red * * *Bush


=SUMPRODUCT((B1:B13="Red")*(C1:C13="Tree"))


will count how many are red and grow from a tree. The following will
count how many are red growing on a tree where the name begins with a
P:


=SUMPRODUCT((LEFT(A1:A13,1)="P")*(B1:B13="Red")*(C 1:C13="Tree"))


You can string many more conditions together in this format of:


=SUMPRODUCT((condition1)*(condition2)*(condition3) *(condition4))
or
=SUMPRODUCT(--(condition1),--(condition2),--(condition3),--
(condition4))


to get a count, where the double unary minus coerces the True/False
values to 1 or 0.


Does this help?


Pete


On Jan 15, 5:15 pm, Scott wrote:
OKAY, let's try a simpler process. *Hoe do I write a formula to count the
number of time that a single text variable in one column matches multiple
text variables in another colmn:


* * * * * * * * * *Fruits * * * * * * * * * * * Source


* * * Apple * * * * * * * * * * * * * * * * Tree
* * * Peach * * * * * * * * * * * * * * * * Tree
* * * Cherry * * * * * * * * * * * * * * * *Tree
* * * Blue Berry * * * * * * * * * * * * *Bush


So the total nymber of fruits (Apple, Peach, Cherry) that grow on a "Tree" = 3


"Pete_UK" wrote:
I'm sorry it didn't work, although it doesn't help to diagnose the
problem(s) by stating just that - what results did you get, and what
did you expect to get? Perhaps you can try it out on just a sub-set of
your data and try to figure out what is happening.


Pete


On Jan 15, 2:03 pm, Scott wrote:
That did not work either.....I'm not sure if you saw the changes I made at
the bottom to the data. *Instead of North, it is "North-A, North-B, and so
on"..so it is is multiple values for the North clinic. *For instance in the
main data sheet I have placed Dr. *Johnsonstien (which is why I used Johnson
with an "*") seeing 4 total people from different areas which all add to his
total patients seen, but they are not all at the same location, yet they are
all from the Northern area. *The columns are 3 separate columns, but when the
post is posted, it shoves them all together for some reason? *If you take
another look at the data, and the totals I am looking for from the data, it
might be more clear. *I am looking to count a number for one doctor from both
several locations that are grouped into one area and also count how many
outside of that area are seen. *It is fairly complicated I know, and in the
old spreadsheets I used to use, I could use a logical IF statement, but for
Excel, I am having some difficulty? I do however, greatly appreciate your
help on this.


"Pete_UK" wrote:
Okay, try this variation of the formula:


=SUMPRODUCT(--(LEFT(TRIM('Monthly USAGE REPORT'!J4:J65536),
7)="Johnson"),--(LEFT(TRIM('Monthly USAGE REPORT'!H4:H65536),
5)="North"))


Note the double minus sign before each term. This should give a count
of where the first part of the doctor's name begins with Johnson and
the first part of the clinic begins with North, even if you have
spaces in front of them.


Hope this helps.


Pete


On Jan 15, 11:46 am, Scott wrote:
KK, tried that and it didn't really give me any total numbers seen? *not sure
how to better explain it then what I have included?


"Pete_UK" wrote:
You only need the $ symbols if you are going to copy the formula down
- the ! is used to indicate a sheet name, which you need in this case.
However, you seem to be trying to use an asterisk as a wildcard, and
that won't work in this case - try it like this:


=SUMPRODUCT((LEFT('Monthly USAGE REPORT'!
J4:J65536,7)="Johnson")*(LEFT('Monthly USAGE REPORT'!
H4:H65536,5)="North"))


Do you really need to use almost a complete column?


It would be better to put Johnson and North in other cells on the same
sheet and refer to those cells in the formula.


Hope this helps.


Pete


On Jan 15, 10:37 am, Scott wrote:
I read your post:


Assume that your main data is in column A to C, starting on row 2. Use
cells D1, E1 and F1 to enable you to specify the doctor's name, the
county and the gender respectively, and then put this formula in G1:


=SUMPRODUCT(($A$2:$A$1000=D1)*($B$2:$B$1000=E1)*($ C$2:$C$1000=F1))


Just change the values in D1, E1 and F1 to get a different result. You
can also copy the formula down to count values in D2:F2 etc.


But I forgot to mention that the information is on one sheet and the totals
are on another sheet. *Also, I am fairly new to this, so I am not sure if I
am doing this correctly, so here is what I put in:


=SUMPRODUCT(('Monthly USAGE REPORT'!J4:J65536="Johnson*")*('Monthly USAGE
REPORT'!H4:H65536="North*"))


But I did not get the expected results. *I used the high lite option when
picking the cells and the program automatically gave me the ! instead of the
$ that you had listed?


To setup the scenario, I have 10 doctors from 15 clinics being tracked on one
spreadsheet. *There are three columns I want to count from: Doctor, Clinic,
Gender. I would like to create logic statement to count the total number of
patients a specific doctor sees in relation to a specific clinic.. *Also how
many patients he sees from a region such as the northern clinics (let's say
clinic A,B,C all designated within the "Clinic" column) and how many of the
total people he sees are from his own clinic. *


Relating to gender, I would like to count how many of each gender were seen
at each clinic and how many of each gender were seen for a region.


I am sure that the answer is really a variation of a nestled statement to
answer all of these, but I d not know how to create it. I will list a sample
of the columns below:


Gender * * * * * * Clinic * * * * * * *Doctor


Male * * * * * * * North-A * * * *Johnsonstien
Female * * * * * North-A * * * *Johnsonstien
Male * * * * * * * South * * * * * *Billing
Male * * * * * * * North -B * * * Billing
Female * * * * * South * * * * * *Crestofen
Female * * * * * East * * * * * * *Johnsonstien
Male * * * * * * * North-A * * * *Johnsonstien


Total North seen by Doctor *Johnsonstien:
Total Non-North seen by Doctor *Johnsonstien:
Total North and South, but not East seen by Doctor *Johnsonstien:
Total Male seen by North:
Total Male seen by Non-North:
Total Male seen by Doctor *Johnsonstien:
Total Male from North seen by Doctor *Johnsonstien:
Total Male from Non-North seen by Doctor *Johnsonstien:
Total North seen by other than Doctor *Johnsonstien:- Hide quoted text -


- Show quoted text -- Hide quoted text -


- Show quoted text -- Hide quoted text -


- Show quoted text -- Hide quoted text -


- Show quoted text -- Hide quoted text -


- Show quoted text -


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
COUNTIF with AND logic Mitchell_Collen via OfficeKB.com Excel Worksheet Functions 8 June 19th 07 11:02 PM
Countif Using Multiple Logic Tests Carl Excel Worksheet Functions 3 June 4th 06 07:09 AM
COUNTIF with Logic? Leonhardtk Excel Worksheet Functions 3 January 10th 06 11:09 PM
Multiple IF THEN ELSE statment Mark G Excel Worksheet Functions 5 March 18th 05 08:51 PM
Countif with AND logic mlkpied Excel Worksheet Functions 8 December 9th 04 11:47 AM


All times are GMT +1. The time now is 12:50 PM.

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"