DDCHXR Daily Detail Change in Any Direction With Rollover function
SYNTAX:
DDCHXR(Vx,Xstarthour,Xendhour,Ystarthour, Yendhour,optional RolloverPoint)
where :
Vx is a variable x
Xstarthour is a starting hour
Xendhour is an ending hour (stop hour)
Ystarthour is a starting hour
Yendhour is an ending hour (stop hour)
NOTES:
The change (or difference) is computed using X-Y.
This function will search for each X and Y value in the time ranges specified by starthour and endhour.
Unless you explicitly specify the RolloverPoint, rollover point is assumed at the next power of 10.
EXAMPLES:
Example 1: V2 = DDCHXR(V1,-1,-12,0,23) (Yesterday's 11PM reading - Todays first Reading)
X is searched for using -1 (or 11pm of the previous day) for its starthour and -12 (or noon of the previous day) for its endhour. Since Xendhour < Xstarthour, the function will start searching for X at Xstarthour and then go backwards in time until it reaches Xendhour. If no value is found in this time range, the whole function returns a blank.
Y is searched for using 0 (or the start of the current day) for its starthour and 23 (end of current day) for its endhour. In this case, Ystarthour < Yendhour, hence the function searches forward in time. If no value is found in this time range, the whole function returns a blank.
Example 2: V2 = DDCHXR(V1,24,26,0,2) (Tomorrow's First Reading - Todays first Reading)
To get Tomorrow's First Reading start at hour 24 and end at 26. (Tomorrow's 1st hour's reading serching forward until the 2AM reading). To get today's first reading start at hour 0 and end at 2 (todays 1st hour's reading serching forward until the 2AM reading).