View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Dave Peterson
 
Posts: n/a
Default I would like to Count values in two columns.

=countif(f1:f9999,"c/s*")
for a single count


If it starts with c/s:
=sumproduct(--('dr mcnanley'!d1:d9999="procedure"),
--(left('dr mcnanley'!f1:f9999,3)="c/s"))

if it contains c/s:
=SUMPRODUCT(--('dr mcnanley'!D1:D9999="procedure"),
--(ISNUMBER(SEARCH("c/s",'dr mcnanley'!F1:F9999))))

Adjust the ranges to match--but you can't use whole columns.

=sumproduct() likes to work with numbers. The -- stuff changes trues and falses
to 1's and 0's.

Bob Phillips explains =sumproduct() in much more detail he
http://www.xldynamic.com/source/xld.SUMPRODUCT.html

And J.E. McGimpsey has some notes at:
http://mcgimpsey.com/excel/formulae/doubleneg.html


Roni wrote:

Thank you Dave!!!! That worked.... Now next problem...
The doctors are writing "C/S Primary" and "C/S Repeat"
I want it to count any cell that has "C/S" in it....

"Dave Peterson" wrote:

Try limiting your range (F1:F9999, maybe???).

=sumproduct() doesn't like whole columns.

Roni wrote:

When I do that, I get a "#Num!" error

=SUMPRODUCT(('Dr McNanley'!F:F="Grunert")*('Dr McNanley'!D:D="Vaginal"))

"Don Guillett" wrote:

try
=sumproduct((a2:a22="Dr Smith")*(b2:b22="procedure1"))

--
Don Guillett
SalesAid Software

"Roni" wrote in message
...
Hello - I am going INSANE for over a month now.... I need to figure out
how
to add up this information.

I have one column (Coulmn F) which list Doctors
I have another column (Column D) which list procedures

I need to count how many times each doctor did each type of procedure.

So I THINK I need to add up each occurance of "Dr.Smith" AND "Procedure 1"

Any help would be GREATLY Appreciated!!!! Thanks in advance!

Roni




--

Dave Peterson


--

Dave Peterson