Need help how to insert moving range within a formula

nmss18

Active Member
Joined
Jun 28, 2011
Messages
312
Hello,
I have a table of market trader data activity from Jan 2012 until Dec 2014. Each user has their First login date, their last login date and their current status, whether they are currently active or inactive (which means their account was cancelled).

I am using the forecast formula to basically identify an up or down trend value. The FORECAST parameters are =FORECAST(x, Known y's values, known x's).

In my formula, I am using the entire 3 year time frame for my known Y and x values, which is technically not accurate.
For example. User #1 first logged in on March 2014 and last logged in on August 2014. He was active for 6 months only. Therefore, I cant use pre March 2014 and post Aug-2014 in the range.

I am looking for 2 things:
1. For INACTIVE Users: Is there a way I can build the formula to only use the range between the first login date and the last login date.
2. For ACTIVE Users: Is there a way I can build the formula to only use the range between the first login date and thr remainder of the time range (which in this case is Dec -14 in cell AP5)

I have a feeling this might be a little too complex but am hoping someone out there could assist.
Many thanks,
Nathan



Excel 2010
CDEFGHIJKLMNOPQRSTUVWXYZAAABACADAEAFAGAHAIAJAKALAMANAOAPAQAR
5Jan-12Feb-12Mar-12Apr-12May-12Jun-12Jul-12Aug-12Sep-12Oct-12Nov-12Dec-12Jan-13Feb-13Mar-13Apr-13May-13Jun-13Jul-13Aug-13Sep-13Oct-13Nov-13Dec-13Jan-14Feb-14Mar-14Apr-14May-14Jun-14Jul-14Aug-14Sep-14Oct-14Nov-14Dec-14Jan-15
6Client NameFirst Login DateLast Login DateCurrent User Status2012 January2012 February2012 March2012 April2012 May2012 June2012 July2012 August2012 September2012 October2012 November2012 December2013 January2013 February2013 March2013 April2013 May2013 June2013 July2013 August2013 September2013 October2013 November2013 December2014 January2014 February2014 March2014 April2014 May2014 June2014 July2014 August2014 September2014 October2014 November2014 DecemberFORECAST Value
7User #103/03/201408/23/2014Inactive43,75561,33743,30014,60033,62249,50023216
8User #208/27/200401/30/2012Inactive87,460 
9User #309/17/201201/05/2015Active11014220110301141837583492,9231271
10User #408/23/201201/06/2015Active44620,0378,8994,9172,2214,3551,6178131,1672331,08711,36216201,9361,5591,11715,0504423,1302,12112,0545141
11User #502/01/201401/02/2015Active60,150246,20046,20052,20013,8755,11453,361157,200300,375373,83371250
12User #612/23/201101/06/2015Active62,98654,9807,50276,69635,06033,47338,59115,92154,62624,35551,04371,082134,940183,635300,433282,182398,158395,968436,087513,562597,9971,117,3881,976,659505,934938,7641,506,3301,221,6921,565,2231,142,4431,695,3192,445,7631,466,2442,540,4913,830,9016,157,6284,140,6452919605
13User #707/03/201201/06/2015Active50,6504,00011,05510,91148,1064,40024,79426,96221,16038,80617,84324,88734,50025,67218,37922,75939,92531,87214,8559,60018,92131,3419,71819,03232,80312,39431,23743,22218,87961,67729589
14User #806/28/201306/24/2014Inactive7109443103,9872,9314016023,4944574
15User #906/07/201301/06/2015Active1298821,35248212173
16User #1005/29/201301/06/2015Active24826,55920,85154,75942,70748,54626,53549,86232,42362,64224,51513,31557,96983,711120,625165,06243,329134,86666,637106348
17User #1105/29/201301/07/2015Active1,64510,91320,54545,03152,15766,18372,08051,23036,73733,99824,54620,03810,98619,17725,430114,84323,188129,22223,89858932
18User #1210/18/200701/02/2015Active81,42136,032240,322183,046243,063373,263362,796434917
19User #1310/18/200706/19/2014Active530,668304,200406,287239,932355,393598,170137,688251,610247,836395,349252,060373,230528,521262,10390,262273,50220,27510,86911,40684,02180,700125,13677,58169,774164,507174,331179,38885,58934,796-52873
20User #1405/17/201109/12/2013Inactive310,15752,255140,442142,159194,588266,26621,93912,79410,5004,07810,0686,02511,71166235,3504,84651,31965,774155-168604
21User #1510/05/201106/11/2012Inactive111,088-1226851
22User #1610/03/201101/02/2015Active330,702583,284629,720467,799387,284129,257113,350132,200158,850683,730161,180129,213737,701294,033333,759363,215183,2997,220466,196265,138201,361219,7859,848136,203203,084120,67581,69981,32794,67167,70582,30385,61566,85382,37139778,36814180
23User #1711/16/201106/29/2012Inactive526 
24User #1811/03/201401/06/2015Active76,300207,824343732
25User #1911/03/201401/06/2015Active298,296210,365119503
26User #2011/18/201101/06/2015Active7,545,5869,254,6756,977,6614,125,7944,010,8993,325,8263,270,4834,429,1241,961,3795,183,3615,770,7793,508,3895,340,14613,249,2282,524,4275,377,5642,309,3831,836,3651,881,1381,676,6223,327,5294,232,3079,018,7344,524,3983,618,1407,795,3005,567,4363,440,9552,087,2622,942,9953,766,8163,770,3613,842,8044,069,0998,209,9759,492,4804585148
27User #2105/11/201101/06/2015Active1,8004,0005,00028,50069,80530,90022,90036,5024,00046,00149,50825,37879,00011,60031,80029,65016,00036,25051,50046,25016,80032,70047,70029,55097,00076,79730,00072,25930,4447,75016,25024,00048,500107,70043,15077,31557100
28User #2209/22/200811/27/2013Inactive3,348,9072,104,8156,068,1803,533,6284,423,1856,552,6663,845,6193,926,3496,513,6524,483,0375,224,7473,826,8062,589,6992,732,4036,167,7004,361,8608,462,8624,531,2361,610,5472,767,7674,516,1925,777,6165,829,1335216481
29User #2309/23/200811/27/2013Inactive5,593,7523,970,6814,362,4415,300,1964,633,3913,036,3854,250,8614,051,1154,098,4564,660,3044,938,9544,835,1264,063,9324,579,5163,572,3573,377,4404,659,2013,521,9594,839,5293,529,4083,181,4855,152,5035,293,5373951677
30User #2410/02/201212/29/2014Inactive55,0005,00085,10053,330119,231105,915119,50099,500332,500139,000111,729308,33080,900190,27162,56675,454171894
31User #2509/02/201101/06/2015Active171,297275,7971,127,176361,211200,85284,890123,84641,84266,81720,42039,541146,23432,35429,64650,14016,738144,641129,069206,265213,22616,417115,011237,224416,799577,305105,890168,85911,51592,17136,64381,925197,53869,21177,20110,10093,35168387
32User #2604/24/201404/24/2014Inactive25,000 
33User #2707/03/201407/17/2014Inactive1,000 
34User #2804/04/201401/06/2015Active2,499,9114,753,8284,434,4744,654,4978,379,3135,388,5937,076,3564,133,5196,025,6286780802
Example Sheet
Cell Formulas
RangeFormula
AR7=IFERROR(FORECAST($AR$5,G7:AP7,$G$5:$AP$5),"")
AR8=IFERROR(FORECAST($AR$5,G8:AP8,$G$5:$AP$5),"")
AR9=IFERROR(FORECAST($AR$5,G9:AP9,$G$5:$AP$5),"")
AR10=IFERROR(FORECAST($AR$5,G10:AP10,$G$5:$AP$5),"")
AR11=IFERROR(FORECAST($AR$5,G11:AP11,$G$5:$AP$5),"")
AR12=IFERROR(FORECAST($AR$5,G12:AP12,$G$5:$AP$5),"")
AR13=IFERROR(FORECAST($AR$5,G13:AP13,$G$5:$AP$5),"")
AR14=IFERROR(FORECAST($AR$5,G14:AP14,$G$5:$AP$5),"")
AR15=IFERROR(FORECAST($AR$5,G15:AP15,$G$5:$AP$5),"")
AR16=IFERROR(FORECAST($AR$5,G16:AP16,$G$5:$AP$5),"")
AR17=IFERROR(FORECAST($AR$5,G17:AP17,$G$5:$AP$5),"")
AR18=IFERROR(FORECAST($AR$5,G18:AP18,$G$5:$AP$5),"")
AR19=IFERROR(FORECAST($AR$5,G19:AP19,$G$5:$AP$5),"")
AR20=IFERROR(FORECAST($AR$5,G20:AP20,$G$5:$AP$5),"")
AR21=IFERROR(FORECAST($AR$5,G21:AP21,$G$5:$AP$5),"")
AR22=IFERROR(FORECAST($AR$5,G22:AP22,$G$5:$AP$5),"")
AR23=IFERROR(FORECAST($AR$5,G23:AP23,$G$5:$AP$5),"")
AR24=IFERROR(FORECAST($AR$5,G24:AP24,$G$5:$AP$5),"")
AR25=IFERROR(FORECAST($AR$5,G25:AP25,$G$5:$AP$5),"")
AR26=IFERROR(FORECAST($AR$5,G26:AP26,$G$5:$AP$5),"")
AR27=IFERROR(FORECAST($AR$5,G27:AP27,$G$5:$AP$5),"")
AR28=IFERROR(FORECAST($AR$5,G28:AP28,$G$5:$AP$5),"")
AR29=IFERROR(FORECAST($AR$5,G29:AP29,$G$5:$AP$5),"")
AR30=IFERROR(FORECAST($AR$5,G30:AP30,$G$5:$AP$5),"")
AR31=IFERROR(FORECAST($AR$5,G31:AP31,$G$5:$AP$5),"")
AR32=IFERROR(FORECAST($AR$5,G32:AP32,$G$5:$AP$5),"")
AR33=IFERROR(FORECAST($AR$5,G33:AP33,$G$5:$AP$5),"")
AR34=IFERROR(FORECAST($AR$5,G34:AP34,$G$5:$AP$5),"")
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
Hi,

Unfortunately, I have never used the FORECAST function but a quick test would seem to indicate that it already is programmed to ignore any missing values.

Do you have an example of a forecast value that has been calculated incorrectly?
 
Upvote 0
Interesting. Where did you see that?
Also, since I posted this it seems that I would like to use the SLOPE function. I would like the function to include the 0 values. Perhaps I could put a .01 value in each blank cell, but that could get very messy.
 
Upvote 0
I just tried it out.

Create two columns with numbers from 0 to 9 in each. (If you put the same numbers in each then the answer will be easy to predict mentally.)
Use FORECAST to predict the result.
Then delete some values and see what happens.
Another test would be to replace a blank y-value with a zero. The forecast will change (assuming there is an associated x-value.)
 
Upvote 0

Forum statistics

Threads
1,215,110
Messages
6,123,138
Members
449,098
Latest member
Doanvanhieu

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