View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
PineRest
 
Posts: n/a
Default Subtotals by count

Running Excel 2003 Sp1. I have a spreadsheet with 2 colums that I need a
subtotals on. The column A has doctor name in it. Column B has procedure
codes in it. The file is sorted by doctor's name and within doctor's name,
procedure codes. What I am after is the subtotal of the count of each
procedure codes that a dr has done When I use the "DataSubtotal" function,
I don't get the results I expect. The following is an exmaple of the raw data
and then what I am trying to accomplish. Any help would be greatly
appreciated.

Raw Data
Col A Col B
Dr. A Procedure code 1
Dr. A Procedure code 1
Dr. A Procedure code 2
Dr. B Procedure code 1
Dr. B Procedure code 3
Dr. B Procedure code 3
Dr. B Procedure code 5

I need the subtotals to look like this

Procedure code 1 count = 2
Procedure code 2 count = 1
Dr. A count = 3

Procedure code 1 count = 1
Procedure code 3 count = 2
Prodedure code 5 count = 1
Dr. B count = 4
Grand totals count for each colum = 7