ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Subtotals by count (https://www.excelbanter.com/excel-discussion-misc-queries/87884-subtotals-count.html)

PineRest

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


Bob Phillips

Subtotals by count
 
Put it in a pivot table.

See http://www.contextures.com/xlPivot01.html
and http://www.peltierteh.com/Excel/Pivots/pivottables.htm


--
HTH

Bob Phillips

(remove xxx from email address if mailing direct)

"PineRest" wrote in message
...
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





All times are GMT +1. The time now is 08:02 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com