{"text_format":"1","workbook":"xlsx","n_sheets":5,"sheets":["Cover","Navigator","Model Parameters","Solution","Error Checks"],"not_rendered":{"charts":0,"images":1,"macros":1,"external_links":0,"defined_names":29,"comments":0,"pivot_tables":0},"unopened":[],"bounds":{"document_bytes":16777216,"sheet_cells":100000,"rows_first":2000,"rows_last":500,"rows_between":2000,"halvings":0,"cell_chars":16384,"cell_head_chars":4096},"cells_cut":0,"cells_raw":0,"read":"whole","date_system":"1900"}

{"sheet":"Cover","index":0,"n_rows":22,"n_cols":7,"rows_kept":22,"cut":false,"hidden":false,"merged":[[16,2,16,9],[17,2,17,9],[21,6,21,8]]}
[]
[]
["Navigator"]
[]
[null,null,{"$f":"Client_Name","v":"Example"}]
[null,null,{"$f":"Model_Name","v":"SP Next Friday.xlsm"}]
[]
[]
[]
[]
[]
[]
[]
[null,null,"Primary Developer:  Cecile Nguyen"]
[]
[null,null,"General Cover Notes:"]
[null,null,"Manic Monday Mulling to Final Freaky Friday Fix for November 2017: Calendar problem, finding the next occurrence of a day/weekday combination"]
[]
[]
[]
[null,null,"Any queries, please e-mail:",null,null,null,"cecile.nguyen@sumproduct.com"]
[null,null,"Website:",null,null,null,"www.sumproduct.com"]

{"sheet":"Navigator","index":1,"n_rows":12,"n_cols":7,"rows_kept":12,"cut":false,"hidden":false,"merged":[]}
["Navigator"]
[{"$f":"Model_Name","v":"SP Next Friday.xlsm"}]
["Navigator"]
[null,null,null,null,"Error Checks:",null,{"$f":"Overall_Error_Check","v":0}]
[]
[]
[null,1,"Table of Contents"]
[]
[null,null,null,null,null,"Cover"]
[null,null,null,null,null,"Model Parameters"]
[null,null,null,null,null,"Solution"]
[null,null,null,null,null,"Error Checks"]

{"sheet":"Model Parameters","index":2,"n_rows":41,"n_cols":9,"rows_kept":41,"cut":false,"hidden":false,"merged":[[0,9,0,10],[10,6,10,13],[11,6,11,13]]}
[{"$f":"IF(ISERROR(RIGHT(CELL(\"filename\",A1),LEN(CELL(\"filename\",A1))-FIND(\"]\",CELL(\"filename\",A1)))),\n\"\",\nRIGHT(CELL(\"filename\",A1),LEN(CELL(\"filename\",A1))-FIND(\"]\",CELL(\"filename\",A1))))","v":"Model Parameters"}]
[{"$f":"Model_Name","v":"SP Next Friday.xlsm"}]
["Navigator"]
[null,null,null,null,"Error Checks:",null,null,null,{"$f":"Overall_Error_Check","v":0}]
[]
[null,{"$f":"MAX($B$5:$B5)+1","v":1},"General"]
[]
[null,null,"Key Inputs"]
[]
[null,null,null,null,"General"]
[null,null,null,null,"Model Name",null,{"$f":"IF(ISERROR(OR(FIND(\"[\",CELL(\"filename\",A1)),FIND(\"]\",CELL(\"filename\",A1)))),\"\",MID(CELL(\"filename\",A1),FIND(\"[\",CELL(\"filename\",A1))+1,FIND(\"]\",CELL(\"filename\",A1))-FIND(\"[\",CELL(\"filename\",A1))-1))","v":"SP Next Friday.xlsm"}]
[null,null,null,null,"Client Name",null,"Example"]
[]
[]
[null,{"$f":"MAX($B$5:$B14)+1","v":2},"General Range Names"]
[]
[null,null,"Technical Assumptions"]
[]
[null,null,null,null,"Days in Year",null,365]
[null,null,null,null,"Months in Month",null,1]
[null,null,null,null,"Months in Quarter",null,3]
[null,null,null,null,"Months in Half Yr",null,6]
[null,null,null,null,"Months in Year",null,12]
[null,null,null,null,"Quarters in Year",null,4]
[]
[null,null,null,null,"Rounding Accuracy",null,5]
[]
[null,null,null,null,"Very Large Number",null,9.9999999999999997E+98]
[null,null,null,null,"Very Small Number",null,1E-8]
[]
[null,null,null,null,"Thousand",null,1000]
[]
[null,null,"Days in Week"]
[]
[null,null,null,null,"Sunday",null,{"$f":"E35","v":"Sunday"},null,"List_DaysInWeek"]
[null,null,null,null,"Monday",null,{"$f":"E36","v":"Monday"}]
[null,null,null,null,"Tuesday",null,"Tuesday"]
[null,null,null,null,"Wednesday",null,"Wednesday"]
[null,null,null,null,"Thursday",null,"Thursday"]
[null,null,null,null,"Friday",null,"Friday"]
[null,null,null,null,"Saturday",null,"Saturday"]

{"sheet":"Solution","index":3,"n_rows":49,"n_cols":9,"rows_kept":49,"cut":false,"hidden":false,"merged":[[0,9,0,10]]}
[{"$f":"IF(ISERROR(RIGHT(CELL(\"filename\",A1),LEN(CELL(\"filename\",A1))-FIND(\"]\",CELL(\"filename\",A1)))),\n\"\",\nRIGHT(CELL(\"filename\",A1),LEN(CELL(\"filename\",A1))-FIND(\"]\",CELL(\"filename\",A1))))","v":"Solution"}]
[{"$f":"Model_Name","v":"SP Next Friday.xlsm"}]
["Navigator"]
[null,null,null,null,"Error Checks:",null,null,null,{"$f":"Overall_Error_Check","v":0}]
[]
[null,{"$f":"MAX($B$5:$B5)+1","v":1},"Next Friday"]
[]
[null,null,"Inputs"]
[]
[null,null,null,null,"Numeric Day of Month",null,29]
[]
[null,null,null,null,"Day of Week",null,"Friday"]
[]
[null,null,null,null,"Input Date",null,"1900-01-01"]
[]
[null,null,"Outputs"]
[]
[null,null,null,null,null,"Year","Date","Since Last"]
[null,null,null,null,null,{"$f":"YEAR(DateTable[[#This Row],[Date]])","v":1900},{"$f":"IF(ROW()-ROW(DateTable[])=0,\nDATE(YEAR(Input_StartDate),MATCH(TRUE,WEEKDAY(DATE(YEAR(Input_StartDate),ROW($A$1:$A$15)+MONTH(Input_StartDate)+IF(DAY(Input_StartDate)<Input_DayNum,-1,0),Input_DayNum))=MATCH(Input_WeekDay,List_DaysInWeek,0),0),Input_DayNum),\nDATE(YEAR(OFFSET(DateTable[[#This Row],[Date]],-1,0)),MATCH(TRUE,WEEKDAY(DATE(YEAR(OFFSET(DateTable[[#This Row],[Date]],-1,0)),ROW($A$1:$A$15)+MONTH(OFFSET(DateTable[[#This Row],[Date]],-1,0)),Input_DayNum))=MATCH(Input_WeekDay,List_DaysInWeek,0),0)+MONTH(OFFSET(DateTable[[#This Row],[Date]],-1,0)),Input_DayNum))","v":"1900-06-29"},{"$f":"IF(ROW()-ROW(DateTable[])=0,\"\",\"+ \"&(YEAR(DateTable[[#This Row],[Date]])-YEAR(OFFSET(DateTable[[#This Row],[Date]],-1,0)))*12+MONTH(DateTable[[#This Row],[Date]])-MONTH(OFFSET(DateTable[[#This Row],[Date]],-1,0))&\" months\")","v":""}]
[null,null,null,null,null,{"$f":"YEAR(DateTable[[#This Row],[Date]])","v":1901},{"$f":"IF(ROW()-ROW(DateTable[])=0,\nDATE(YEAR(Input_StartDate),MATCH(TRUE,WEEKDAY(DATE(YEAR(Input_StartDate),ROW($A$1:$A$15)+MONTH(Input_StartDate)+IF(DAY(Input_StartDate)<Input_DayNum,-1,0),Input_DayNum))=MATCH(Input_WeekDay,List_DaysInWeek,0),0),Input_DayNum),\nDATE(YEAR(OFFSET(DateTable[[#This Row],[Date]],-1,0)),MATCH(TRUE,WEEKDAY(DATE(YEAR(OFFSET(DateTable[[#This Row],[Date]],-1,0)),ROW($A$1:$A$15)+MONTH(OFFSET(DateTable[[#This Row],[Date]],-1,0)),Input_DayNum))=MATCH(Input_WeekDay,List_DaysInWeek,0),0)+MONTH(OFFSET(DateTable[[#This Row],[Date]],-1,0)),Input_DayNum))","v":"1901-03-01"},{"$f":"IF(ROW()-ROW(DateTable[])=0,\"\",\"+ \"&(YEAR(DateTable[[#This Row],[Date]])-YEAR(OFFSET(DateTable[[#This Row],[Date]],-1,0)))*12+MONTH(DateTable[[#This Row],[Date]])-MONTH(OFFSET(DateTable[[#This Row],[Date]],-1,0))&\" months\")","v":"+ 9 months"}]
[null,null,null,null,null,{"$f":"YEAR(DateTable[[#This Row],[Date]])","v":1901},{"$f":"IF(ROW()-ROW(DateTable[])=0,\nDATE(YEAR(Input_StartDate),MATCH(TRUE,WEEKDAY(DATE(YEAR(Input_StartDate),ROW($A$1:$A$15)+MONTH(Input_StartDate)+IF(DAY(Input_StartDate)<Input_DayNum,-1,0),Input_DayNum))=MATCH(Input_WeekDay,List_DaysInWeek,0),0),Input_DayNum),\nDATE(YEAR(OFFSET(DateTable[[#This Row],[Date]],-1,0)),MATCH(TRUE,WEEKDAY(DATE(YEAR(OFFSET(DateTable[[#This Row],[Date]],-1,0)),ROW($A$1:$A$15)+MONTH(OFFSET(DateTable[[#This Row],[Date]],-1,0)),Input_DayNum))=MATCH(Input_WeekDay,List_DaysInWeek,0),0)+MONTH(OFFSET(DateTable[[#This Row],[Date]],-1,0)),Input_DayNum))","v":"1901-11-29"},{"$f":"IF(ROW()-ROW(DateTable[])=0,\"\",\"+ \"&(YEAR(DateTable[[#This Row],[Date]])-YEAR(OFFSET(DateTable[[#This Row],[Date]],-1,0)))*12+MONTH(DateTable[[#This Row],[Date]])-MONTH(OFFSET(DateTable[[#This Row],[Date]],-1,0))&\" months\")","v":"+ 8 months"}]
[null,null,null,null,null,{"$f":"YEAR(DateTable[[#This Row],[Date]])","v":1902},{"$f":"IF(ROW()-ROW(DateTable[])=0,\nDATE(YEAR(Input_StartDate),MATCH(TRUE,WEEKDAY(DATE(YEAR(Input_StartDate),ROW($A$1:$A$15)+MONTH(Input_StartDate)+IF(DAY(Input_StartDate)<Input_DayNum,-1,0),Input_DayNum))=MATCH(Input_WeekDay,List_DaysInWeek,0),0),Input_DayNum),\nDATE(YEAR(OFFSET(DateTable[[#This Row],[Date]],-1,0)),MATCH(TRUE,WEEKDAY(DATE(YEAR(OFFSET(DateTable[[#This Row],[Date]],-1,0)),ROW($A$1:$A$15)+MONTH(OFFSET(DateTable[[#This Row],[Date]],-1,0)),Input_DayNum))=MATCH(Input_WeekDay,List_DaysInWeek,0),0)+MONTH(OFFSET(DateTable[[#This Row],[Date]],-1,0)),Input_DayNum))","v":"1902-08-29"},{"$f":"IF(ROW()-ROW(DateTable[])=0,\"\",\"+ \"&(YEAR(DateTable[[#This Row],[Date]])-YEAR(OFFSET(DateTable[[#This Row],[Date]],-1,0)))*12+MONTH(DateTable[[#This Row],[Date]])-MONTH(OFFSET(DateTable[[#This Row],[Date]],-1,0))&\" months\")","v":"+ 9 months"}]
[null,null,null,null,null,{"$f":"YEAR(DateTable[[#This Row],[Date]])","v":1903},{"$f":"IF(ROW()-ROW(DateTable[])=0,\nDATE(YEAR(Input_StartDate),MATCH(TRUE,WEEKDAY(DATE(YEAR(Input_StartDate),ROW($A$1:$A$15)+MONTH(Input_StartDate)+IF(DAY(Input_StartDate)<Input_DayNum,-1,0),Input_DayNum))=MATCH(Input_WeekDay,List_DaysInWeek,0),0),Input_DayNum),\nDATE(YEAR(OFFSET(DateTable[[#This Row],[Date]],-1,0)),MATCH(TRUE,WEEKDAY(DATE(YEAR(OFFSET(DateTable[[#This Row],[Date]],-1,0)),ROW($A$1:$A$15)+MONTH(OFFSET(DateTable[[#This Row],[Date]],-1,0)),Input_DayNum))=MATCH(Input_WeekDay,List_DaysInWeek,0),0)+MONTH(OFFSET(DateTable[[#This Row],[Date]],-1,0)),Input_DayNum))","v":"1903-05-29"},{"$f":"IF(ROW()-ROW(DateTable[])=0,\"\",\"+ \"&(YEAR(DateTable[[#This Row],[Date]])-YEAR(OFFSET(DateTable[[#This Row],[Date]],-1,0)))*12+MONTH(DateTable[[#This Row],[Date]])-MONTH(OFFSET(DateTable[[#This Row],[Date]],-1,0))&\" months\")","v":"+ 9 months"}]
[]
[]
[]
[null,{"$f":"MAX($B$5:$B21)+1","v":2},"Black Friday"]
[]
[null,null,"Inputs"]
[]
[null,null,null,null,"Year",null,1901]
[]
[null,null,"Outputs"]
[]
[null,null,null,null,"Black Friday",null,{"$f":"DATE(Input_BFYear,11,MATCH(TRUE,WEEKDAY(DATE(Input_BFYear,11,ROW($A$1:$A$7)+22))=6,0)+22)","v":"1901-11-29"}]
[]
[]
[null,{"$f":"MAX($B$5:$B32)+1","v":3},"Next Specific Black Friday"]
[]
[]
[null,null,"Inputs"]
[]
[null,null,null,null,"Black Friday Year",null,2097]
[]
[null,null,"Outputs"]
[]
[null,null,null,null,"Corresponding Black Friday",null,{"$f":"DATE(Input_NBFYear,11,MATCH(TRUE,WEEKDAY(DATE(Input_NBFYear,11,ROW($A$1:$A$7)+22))=6,0)+22)","v":"2097-11-29"}]
[]
[null,null,null,null,"Next Specific Black Friday",null,{"$f":"DATE(Input_NBFYear+MATCH(TRUE,WEEKDAY(DATE(Input_NBFYear+ROW($A$1:$A56),11,DAY(G47)))=6,0),11,DAY(G47))","v":"2109-11-29"}]

{"sheet":"Error Checks","index":4,"n_rows":17,"n_cols":9,"rows_kept":17,"cut":false,"hidden":false,"merged":[[0,8,0,9]]}
[{"$f":"IF(ISERROR(RIGHT(CELL(\"filename\",A1),LEN(CELL(\"filename\",A1))-FIND(\"]\",CELL(\"filename\",A1)))),\n\"\",\nRIGHT(CELL(\"filename\",A1),LEN(CELL(\"filename\",A1))-FIND(\"]\",CELL(\"filename\",A1))))","v":"Error Checks"}]
[{"$f":"Model_Name","v":"SP Next Friday.xlsm"}]
["Navigator"]
[null,"Error Checks:",null,null,null,{"$f":"Overall_Error_Check","v":0}]
[]
[null,{"$f":"MAX($B$5:$B5)+1","v":1},"Error Checks"]
[]
[null,null,"Summary of Errors"]
[]
[null,null,null,"Assumptions"]
[]
[null,null,null,null,"Example"]
[]
[]
[]
[]
[null,null,null,null,{"$f":"C8","v":"Summary of Errors"},null,null,null,{"$f":"MIN(1,SUM(I11:I15))","v":0}]