How to deal with a 14 month (period) year - VBA

jlax2485

New Member
Joined
Mar 24, 2017
Messages
6
Hi Everyone,

I am running into a frustrating problem with a VBA project I am working on. Our organization uses a 14 month year (12 regular months and 2 special posting periods for trailing charges), and I am not sure how to handle the two extra periods. I want to validate that the month of the column where I extracted the data matches the month of the column where the sum of this data will be placed.

For example, I thought of verifying that the MONTH( ) of each item in the ranges match, but it wont work with anything beyond 12. Our system uses the order of the month in the fiscal year, so (1/2018 = July 2017, 6/2018 = December 2017 and so forth). I could get around that with DATEADD( ) but it wont work with the two extra periods.

For periods 13 and 14, I want those values to be added onto June's total (the last month of our fiscal year). I have searched but cannot find anything useful to inspire me to get around this problem. Any help you can provide would be most appreciated!
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
Not everything in those extra two months can be trailing charges (otherwise you'd just have 14-month 'years'). So those items (columns, entries, ???) must be annotated or segregated somehow, no?
 
Upvote 0
Not everything in those extra two months can be trailing charges (otherwise you'd just have 14-month 'years'). So those items (columns, entries, ???) must be annotated or segregated somehow, no?

Unfortunately, Period 13 and 14 count for the fiscal year in which they are posted. They show up as columns of data from a system-generated report, with the "post period date" as the header.

I thought about using a select case statement to put each period into it's corresponding calendar date, and include 13 and 14 as "June 2017" but that would have to be updated each year.
 
Upvote 0
Dunno. Have no idea what your data looks like.
 
Upvote 0
Dunno. Have no idea what your data looks like.

AccountGL CATEGORY001/2017002/2017003/2017004/2017005/2017006/2017007/2017008/2017009/2017010/2017011/2017012/2017013/2017014/2017
80002575615005Personnel 5,000(2,000)5010,00025,000(10,000)25
80006933991412Other15,000(500)2,50035,00025

<tbody>
</tbody>

Sorry about that - here is a rough idea of my source report. My destination template is similar, but I am using corresponding calendar year dates. I am putting the results of each column into an array, because there could be any number of accounts #'s that correspond to a particular line of business, and the sum of what is in each column of the array gets pasted into the destination template.
 
Upvote 0
OK -- so what's the question?

013/2017 are trailing charges for FY17

001/2018 is the same month with charges that apply to FY18.
 
Upvote 0

Forum statistics

Threads
1,215,717
Messages
6,126,422
Members
449,314
Latest member
MrSabo83

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