Calculating YTD, MTD for large dataset

Estee28

New Member
Joined
Aug 10, 2017
Messages
6
Hello,

I am attempting to calculate the YTD, MTD, CYTD and revenue to date for a very large data set which spans the past three years. I have included a small sample below and welcome suggestions on the best way to achieve this. Kind regards,

Esther[TABLE="width: 500"]
<tbody>[TR]
[TD]Year[/TD]
[TD]Month[/TD]
[TD]Banker[/TD]
[TD]Segment[/TD]
[TD]Product Type[/TD]
[TD]Relationship name[/TD]
[TD]Product name[/TD]
[TD]Balances[/TD]
[/TR]
[TR]
[TD]2016[/TD]
[TD]Nov[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]67771[/TD]
[/TR]
[TR]
[TD]2016[/TD]
[TD]Dec[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]38881[/TD]
[/TR]
[TR]
[TD]2016[/TD]
[TD]Dec[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]38401[/TD]
[/TR]
[TR]
[TD]2017[/TD]
[TD]Jan[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]23011[/TD]
[/TR]
[TR]
[TD]2017[/TD]
[TD]Jan[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]17625[/TD]
[/TR]
[TR]
[TD]2017[/TD]
[TD]feb[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]45282[/TD]
[/TR]
[TR]
[TD]2017[/TD]
[TD]feb[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]34627[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
1st, I would advise to use real dates, rather than just numbers (for the year) and text (for the mth), that way you can use SUMIFS() based on dates.

Otherwise, you could probably still use SUMIFS with something like...
YTD
=sumifs(H:H,A:A,2017)
where H contains the sum values and A contains the year

MTD
=sumifs(H:H,A:A,2017, B:B,"feb")
where H contains the sum values and A contains the year and B contains the mth

See if that will get you started?
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,284
Members
452,630
Latest member
OdubiYouth

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