vba code to count columns with duplicates based on 2 criterias

Carguy37122

New Member
Joined
Sep 11, 2014
Messages
17
I've searched the net and can't find a vba code that will work. Any help would be grealy appreciated.

NameReference#Date
steve
1D7HA18N

<tbody>
</tbody><colgroup><col></colgroup>
01-01-2014
ray
1D7HA18N

<tbody>
</tbody><colgroup><col></colgroup>
01-02-2014
tom
1FTFW1ET

<tbody>
</tbody><colgroup><col></colgroup>
01-01-2014
steve
1D7HA18N

<tbody>
</tbody><colgroup><col></colgroup>
01-02-2014
joe
3D7JB1EP

<tbody>
</tbody><colgroup><col></colgroup>
01-01-2014
steve
3N1AB6AP

<tbody>
</tbody><colgroup><col></colgroup>
01-01-2014
steve
5N1AA0NC

<tbody>
</tbody><colgroup><col></colgroup>
01-03-2014
dave
1FTFW1ET

<tbody>
</tbody><colgroup><col></colgroup>
01-01-2014
steve
3N1AB6AP

<tbody>
</tbody><colgroup><col></colgroup>
01-01-2014
joe
3D7JB1EP

<tbody>
</tbody><colgroup><col></colgroup>
01-03-2014
dave
3N1AB6AP

<tbody>
</tbody><colgroup><col></colgroup>
01-01-2014
joe
3N1AB6AP

<tbody>
</tbody><colgroup><col></colgroup>
02-10-2014
steve
1FMHK8D8

<tbody>
</tbody><colgroup><col></colgroup>
02-14-2014
dave
1FMHK8D8

<tbody>
</tbody><colgroup><col></colgroup>
02-18-2014
tom
3N1AB6AP

<tbody>
</tbody><colgroup><col></colgroup>
04-09-2014
craig
2HJYK162

<tbody>
</tbody><colgroup><col></colgroup>
01-18-2014

<tbody>
</tbody>

































It can manually total the information, but it takes quite a while for me.

Name Reference# Dates sum by reference# Sum by Name
craig 2HJYK162 1/18/2014 1 1

dave 1FMHK8D8 2/18/2014 1 3
dave 1FTFW1ET 1/1/2014 1
dave 3N1AB6AP 1/1/2014 1

joe 3D7JB1EP 1/1/2014 1 3
joe 3D7JB1EP 1/3/2014 1
joe 3N1AB6AP 2/10/2014 1

ray 1D7HA18N 1/2/2014 1 1

steve 1D7HA18N 1/1/2014 1 6
steve 1D7HA18N 1/2/2014 1
steve 1FMHK8D8 2/14/2014 1
steve 3N1AB6AP 1/1/2014 1
steve 3N1AB6AP 1/1/2014 1
steve 5N1AA0NC 1/3/2014 1

tom 1FTFW1ET 1/1/2014 1 2
tom 3N1AB6AP 4/9/2014 1

If possible, is ther a code that will do all the calculations for me and just give me a summary like the one below?

craig's activity - 1 purchases in 2014
1 2HJYK162 1/18/2014

dave's activity - 3 purchases in 2014
1 1FTFW1ET 1/1/2014
1 1FMHK8D8 2/18/2014
1 3N1AB6AP 1/1/2014

joe's activity - 3 purchases in 2014
1 3D7JB1EP 1/1/2014
1 3D7JB1EP 1/3/2014
1 3N1AB6AP 2/10/2014

ray's activity - 1 purchases in 2014
1 1D7HA18N 1/2/2014

steve's activity - 6 purchases in 2014
1 1D7HA18N 1/1/2014
1 1D7HA18N 1/2/2014
1 1FMHK8D8 2/14/2014
1 3N1AB6AP 1/1/2014
1 3N1AB6AP 1/1/2014
1 5N1AA0NC 1/3/2014

tom's activity - 2 purchases in 2014
1 1FTFW1ET 1/1/2014
1 3N1AB6AP 4/9/2014


Any help would be GREATLY appreciated!

Thanks!
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number

Forum statistics

Threads
1,191,025
Messages
5,984,201
Members
439,877
Latest member
kellylet

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
Top