Counting the instances of many alphanumeric values across a wide range.

claytont454

New Member
Joined
Feb 28, 2013
Messages
8
I'm hoping someone here knows a better way than my current method that takes about 6 hours of messing around between Excel and Access as a beginner/intermediate user.

I'm working with a table that is about 15000 rows by 18 columns.
Column A is a person's initials, and the rest of the row shows a code for different activities that person did in a single day.
Since this represents several months, each person's initials appears in column A of the table many times.
Sometimes they only have 1 activity for the day, or they may have 15 or 20 in a day.
There are thousands of potential "codes" that may appear in the rest of the columns, and each has a specific meaning.
This is from the healthcare world, so some codes start with a 0, others start with a letter, and they may have one or two or no decimals, and each is meaningful.

My task is to create a list for each person that shows how many times each code appeared for them on all the days represented. Here is a short snippet of my raw data (this is junk data, so there's no confidentiality issues):

NameSDCSDC1SDC2SDC3SDC4SDC5SDC6SDC7SDC8SDC9SDC10SDC11
MB729.5V57.1V12.72 414.00 250.00 401.1 272.4 333.94 600.90
MM729.5719.41 V57.1
DLV724.2V57.1
AEB723.1781.2 V57.1 295.90 318.0 781.0 715.96 244.9 401.9 272.4 V74.1 V04.81
AS727.41V57.21 354.0
SLM959.4V57.21 V62.84 V62.85 244.9 493.90 304.80 296.90
TM340729.89 726.2 V57.1
MBV76.51562.10 V16.0
JK847V57.1569.0 455.2 455.3 V16.0
AH840.9V57.1
...

<tbody>
</tbody>
When I sort by Column A, 'MB' might have 75 rows, 'AEB' might have 113 rows, and so on. In the end, I want to show them sorted like this with each value and how many times it appears for that person, then the next person and the same list for them. The ideal would be to just show the top 10 for each, but that may be too much to ask.
AEB
E000.915
558.98
401.98
E849.07
276.516
E849.96
2506
780.65
3035
79.995

<tbody>
</tbody>

MM
V76.4419
V65.318
73318
780.7917
41417
211.316
59916
30016
276.115
724.515

<tbody>
</tbody>
and so on. Any help you can offer is appreciated!!!
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
Hi and welcome to Mr Excel Forum

Maybe this can help

See this
Excel Reverse PivotTable

Follow
Part A
Part B till step 5 (do not perform step 6)

You are here (using your data sample)

Count of Value
Column Labels
Row Labels
SDC
SDC1
SDC10
SDC11
SDC2
SDC3
SDC4
SDC5
SDC6
SDC7
SDC8
SDC9
Grand Total
AEB
1
1
1
1
1
1
1
1
1
1
1
1
12
AH
1
1
2
AS
1
1
1
3
DLV
1
1
2
JK
1
1
1
1
1
1
6
MB
2
2
2
1
1
1
1
1
1
12
MM
1
1
1
3
SLM
1
1
1
1
1
1
1
1
8
TM
1
1
1
1
4
Grand Total
10
10
1
1
8
5
4
4
3
3
2
1
52

<tbody>
</tbody>


Then follow these steps
Step 1
At the panel located in the right-side of the window
Uncheck Columns
Drag Values to Row Labels (so you end with Values in Row Labels and in Values area)

Step 2
Filter the second column (Values) to get rid of (empty) values

Step 3
Right-click in the first name (AEB in your data sample)
Pick Field settings
Pick the tab Layout & Print
check Insert blank line after each item label

You get this

Row Labels
Count of Value
AEB
12
244.9
1
272.4
1
295.90
1
318.0
1
401.9
1
715.96
1
723.1
1
781.0
1
781.2
1
V04.81
1
V57.1
1
V74.1
1
AH
2
840.9
1
V57.1
1
AS
3
354.0
1
727.41
1
V57.21
1
DLV
2
724.2
1
V57.1
1
JK
6
847
1
455.2
1
455.3
1
569.0
1
V16.0
1
V57.1
1
MB
12
250.00
1
272.4
1
333.94
1
401.1
1
414.00
1
562.10
1
600.90
1
729.5
1
V12.72
1
V16.0
1
V57.1
1
V76.51
1
MM
3
719.41
1
729.5
1
V57.1
1
SLM
8
244.9
1
296.90
1
304.80
1
493.90
1
959.4
1
V57.21
1
V62.84
1
V62.85
1
TM
4
340
1
726.2
1
729.89
1
V57.1
1
Grand Total
52

<tbody>
</tbody>


Hope this is what you need

M.
 
Upvote 0

Forum statistics

Threads
1,214,649
Messages
6,120,732
Members
448,987
Latest member
marion_davis

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top