Creating macros using VBA code

NGNG

New Member
Joined
Aug 9, 2011
Messages
18
Hi,

I need some help with creating a macro using VBA code. Basically I have a spreadsheet that has transactional data and I would like to aggregate it by date and have one row per each date. What I have is below:

Sales Rep ID, Date Entered, Occurence, Total Revenue
32113, 7/1/2011, 1, $1.00
32113, 7/1/2011, 1, $20.00
32113, 7/1/2011, 2, $5.00
32113, 7/1/2011, 2, $0.00
32113, 6/28/2011, 2, $8.00
32113, 6/28/2011, 2, $0.00

AND the result I need to get to with the VBA code is below:

Sales Rep ID, Date Entered, Occurence , Total Revenue
32113, 7/1/2011, 6, $26.00
32113, 6/28/2011, 4, $8.00



Thank You
NG
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.

Forum statistics

Threads
1,224,614
Messages
6,179,906
Members
452,949
Latest member
beartooth91

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