Normalizing utility bills into calenfar month???

PowRider

New Member
Joined
Oct 18, 2014
Messages
12
Hi smart ppl,

I have been pulling my hair out trying to write a set a vba codes that normalize utility bills into actual calendar month.
So far I have..
Column A as Reading Dates (In order from Jan-Dec) (eg. January 15, 2015)
Column B as Year (In order from smallest to largest) (eg. 2015)
Column C as Days (Billing duration) (eg. 30)
Column D as Consumption (15000kWh)
Column E as Daily Average (Col D/Col C)
Column F as Month Label (Jan, Feb etc..)
Column G as total # of days in the reading date month (eg 31)
Column H as # of days in Col A (eg 15)
Column I as Normalized consumption (calculated using H*E+(G-H)*E of next bill).

The idea end result is a pivot table with column labels as Year and Row labels as Month (12 of them) and data field as consumption.

The logic above works only when the accounts has consistent 12 bills per year (1 per month).
However, a lot of energy accounts have bi monthly bills or 2 reading dates in the same month, then my logic wouldn't work....

Maybe I should've taken a completely different route?
Does anyone have any suggestions? Any help would be appreciated.

Thanks!!
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
reading dates31/12/201327/01/201428/02/201401/04/201429/04/201401/06/201430/06/201403/08/201431/08/201402/10/201431/10/201429/11/201430/12/2014
reading0100520273079410052006115714781599191102031200013001
consumption10051022105210211100915103210121032101217971001
days273232283329342832292931
relates tojanfebmaraprmayjunjulaugsepoctnovdec
days in month312831303130313130313031
corrected reading11548941019109410339479411120968108218591001
is the lastrow the numbersyou wouldexpect

<tbody>
</tbody>
 
Upvote 0

Forum statistics

Threads
1,216,575
Messages
6,131,501
Members
449,654
Latest member
andz

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