consolidation of dates

tridento

New Member
Joined
Mar 21, 2014
Messages
5
how would you consolidate dates so you just had the month/year in excel vba?
i have a worksheet (raw data) that has date in column A, miles travelled in column B and i want to create a summary report on a seperate worksheet (report) based on month/year (mmm/yyyy) in column A, total miles travelled in column B where total miles travelled would be a sum of all the data for each month/year that had data e.g
[TABLE="width: 500"]
<tbody>[TR]
[TD]Date[/TD]
[TD]miles travelled[/TD]
[/TR]
[TR]
[TD]01/02/2010[/TD]
[TD]14[/TD]
[/TR]
[TR]
[TD]05/02/2010[/TD]
[TD]23[/TD]
[/TR]
[TR]
[TD]03/05/2011[/TD]
[TD]5[/TD]
[/TR]
[TR]
[TD]03/05/2011[/TD]
[TD]15[/TD]
[/TR]
</tbody>[/TABLE]
after the vba code is run table on report worksheet
[TABLE="width: 500"]
<tbody>[TR]
[TD]date[/TD]
[TD]total miles travelled[/TD]
[/TR]
[TR]
[TD]Feb/2010[/TD]
[TD]37[/TD]
[/TR]
[TR]
[TD]May/2011[/TD]
[TD]20[/TD]
[/TR]
</tbody>[/TABLE]

the raw data worksheet has hundreds of dates in so i just want to be able to summarise per month/year
please help i've been stuck on this for over a month
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.

Forum statistics

Threads
1,223,236
Messages
6,170,917
Members
452,366
Latest member
TePunaBloke

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