Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / May 2008

Tip: Looking for answers? Try searching our database.

How can I automatically split values over specified time periods?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Grushenka - 20 May 2008 15:38 GMT
Hi, I monitor the energy usage for my organisation and report quarterly. As
you will be aware, utility bills do not always come in nice and neat
quarterly or monthly invoicing periods and I would really benefit from a way
of automatically splitting amounts entered into quarters. e.g

I enter 25 Dec 07 to 04 Feb 08 = 1000 kwh

Rather than manually dividing myself, can I allocate 5 days usage to the Oct
to Dec quarter and the rest to the Jan to Mar quarter?

Any help would be greatly appreciated :)
Sam Wilson - 20 May 2008 17:07 GMT
Hi,

I had to do something similar, this was the fastest technique:

Let A & B be your quarter start and end date, X & Y the period covered on
the electricity bill. You want to work out the overlap between these two
periods (you can do the same for the next quarter after AB etc)

The biggest the overlap can be is: A+1-B days (if A and B are the same it's
1 day, hence the +1) So, so far =(A+1-B)

If the bill period ends before the quarter period then you need to knock
theses days off. This is Max(B-Y,0), so we have =(A+1-B) - Max(B-Y,0)

If the bill period starts after the quarter period then you need to knock
these days off, this is Max(X-A,0)... This gives
=(A+1-B)-Max(B-Y,0)-Max(X-A,0)

As a final point, the whole lot must be at least 0 days, so this must be the
final formula:

=Max((A+1-B)-Max(B-Y,0)-Max(X-A,0),0)

I hope that makes sense...

> Hi, I monitor the energy usage for my organisation and report quarterly. As
> you will be aware, utility bills do not always come in nice and neat
[quoted text clipped - 7 lines]
>
> Any help would be greatly appreciated :)
Grushenka - 21 May 2008 10:25 GMT
Thanks Sam! :)

> Hi,
>
[quoted text clipped - 32 lines]
> >
> > Any help would be greatly appreciated :)
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.