SOLVED

Duda con Formula de Excel

%3CLINGO-SUB%20id%3D%22lingo-sub-2353376%22%20slang%3D%22en-US%22%3ERe%3A%20Duda%20con%20Formula%20de%20Excel%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2353376%22%20slang%3D%22en-US%22%3EWhich%20template%20are%20you%20using%20and%20what%20is%20the%20expected%20result%20of%20that%20formula%2C%20please%20share%20more%20information%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2350831%22%20slang%3D%22es-ES%22%3EDoubt%20with%20Excel%20Formula%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2350831%22%20slang%3D%22es-ES%22%3E%3CP%3EDear%20community%2C%20I%20like%20to%20greet%20you%20and%20wish%20you%20success%20in%20your%20roles%20%2F%20endeavors.%3C%2FP%3E%3CP%3EI%20bring%20up%20the%20use%20of%20the%20following%20formula%3A%3C%2FP%3E%3CP%3EYES.%20ERROR(SI(TEXT(DATE(Calendar_Year%3B%20FILA(%24A%201)%3B1)%3B%22%20ddd%22)-LEFT(C%245%3B2)%3B%20DATE(Calendar_Year%3B%20FILA(%24A%201)%3B1)%3B%22%22)%3B%22%22)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThis%20formula%20is%20in%20an%20excel%20template%20about%20registering%20employee%20attendance%2C%20your%20instruction%20is%20not%20very%20clear%2C%20so%20I%20come%20to%20you%2C%20I%20will%20be%20super%20grateful%20if%20you%20explain%20to%20me%20how%20I%20should%20apply%20it%2C%20what%20value%20is%20that%20I%20must%20change.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Eattentive%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2350831%22%20slang%3D%22es-ES%22%3E%3CLINGO-LABEL%3EAdmin%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2357121%22%20slang%3D%22es-ES%22%3ERe%3A%20Doubt%20with%20Excel%20Formula%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2357121%22%20slang%3D%22es-ES%22%3EIn%20the%20message%20attachment%20is%20the%20file%20I'm%20using.%20Thank%20you%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2357675%22%20slang%3D%22en-US%22%3ERe%3A%20Duda%20con%20Formula%20de%20Excel%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2357675%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1052925%22%20target%3D%22_blank%22%3E%40AdminLirios%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20formula%20below%20will%20add%202%20if%20the%20day%20was%20Saturday%2C%201%20if%20the%20day%20was%20Sunday%20otherwise%20just%20return%20today's%20date%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3DIF(TEXT(DATE(YEAR(TODAY())%2CMONTH(TODAY())%2CDAY(TODAY()))%2C%22ddd%22)%3D%22Sat%22%2CDATE(YEAR(TODAY())%2CMONTH(TODAY())%2CDAY(TODAY()))%2B2%2CIF(TEXT(DATE(YEAR(TODAY())%2CMONTH(TODAY())%2CDAY(TODAY()))%2C%22ddd%22)%3D%22Sun%22%2CDATE(YEAR(TODAY())%2CMONTH(TODAY())%2CDAY(TODAY()))%2B1%2CDATE(YEAR(TODAY())%2CMONTH(TODAY())%2CDAY(TODAY()))))%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EYour%20Formula%3A%3C%2FP%3E%3CP%3EERROR(SI(%3CBR%20%2F%3ETEXT(%3CBR%20%2F%3EDATE(Calendar_Year%3B%20FILA(%24A%201)%3B1)%3B%3CBR%20%2F%3E%22%20ddd%22)-LEFT(C%245%3B2)%3B%20DATE(Calendar_Year%3B%20FILA(%24A%201)%3B1)%3B%22%22)%3B%22%22)%3C%2FP%3E%3CP%3EYour%20formula%20translated%3A%3C%2FP%3E%3CP%3E%3DIFERROR(TEXT(DATE(Calendar_Year%2C%20MONTH(NOW())%2C%2C1)%2C%22%20ddd%22)-LEFT(C%245%2C2)%2C%20DATE(Calendar_Year%2C%20MONTH(NOW())%2C1)%2C%22%22)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ETEXT(DATE(Calendar_Year%2CMonth(NOW())%2C1)%2C%22%20ddd%22)%20RETURNS%20A%20%3D%20Sat%20LEFT(C5%2C2)%20RETURNS%20A%20%3D%20DO%3C%2FP%3E%3CP%3Eyour%20formula%20is%20stating%20Sat%20minus%20Do%20at%20this%20point%20in%20your%20formula%3CBR%20%2F%3ETEXT(DATE(Calendar_Year%2CMonth(NOW())%2C1)%2C%22%20ddd%22)-LEFT(C%245%2C2)%20RETURNS%20A%20%3D%20%23VALUE!%3C%2FP%3E%3CP%3Eas%20soon%20as%20your%20formula%20subtracts%20Sat%20from%20Do%20it%20starts%20to%20error%20out%3C%2FP%3E%3CP%3EI'm%20not%20really%20sure%20what%20FILA(%24A%201)statement%20in%20your%20formula%20is%2C%20but%20since%20it%20is%20inside%20the%20DATE%20Function%3A%20DATE(YEAR()%2CMONTH()%2C1)%3C%2FP%3E%3CP%3EI'm%20going%20to%20assume%20its%20trying%20to%20get%20some%20kind%20of%20a%20month%20for%20a%20value%3C%2FP%3E%3CP%3EI%20am%20going%20to%20assume%20that%20your%20date%20formula%20is%20trying%20to%20do%20a%20date%20math%20to%20skip%20domingo%20because%20the%20work%20week%20never%20includes%20a%20Sunday%2C%20is%20this%20a%20correct%20assumption%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2359277%22%20slang%3D%22en-US%22%3ERe%3A%20Duda%20con%20Formula%20de%20Excel%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2359277%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1052925%22%20target%3D%22_blank%22%3E%40AdminLirios%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThat%20is%20well%20known%20Microsoft%20template%2C%20I'd%20don't%20modify%20the%20formulas%20in%20it%20without%20strong%20need.%20The%20only%20it's%20language%20specific.%20If%20formula%20doesn't%20detect%20first%20date%20of%20the%20month%20that%20most%20probably%20means%20in%20your%20locale%20and%20in%20template%20short%20names%20of%20week%20days%20are%20different.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2360487%22%20slang%3D%22es-ES%22%3ERe%3A%20Doubt%20with%20Excel%20Formula%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2360487%22%20slang%3D%22es-ES%22%3EThank%20you%2C%20Yes%20Sir%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2360506%22%20slang%3D%22es-ES%22%3ERe%3A%20Doubt%20with%20Excel%20Formula%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2360506%22%20slang%3D%22es-ES%22%3EYes%2C%20thank%20you%20very%20much.....%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2360541%22%20slang%3D%22en-US%22%3ERe%3A%20Duda%20con%20Formula%20de%20Excel%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2360541%22%20slang%3D%22en-US%22%3E%3CP%3ELooking%20at%20your%20workbook%2C%20in%20the%20calendar%20it%20only%20has%20days%20of%20the%20week%20i.e.%20Lunes%2C%20martes%2C%20mi%C3%A9rcoles%2C%20jueves%20y%20viernes%2C%20but%20no%20actual%20date%2C%20so%20how%20do%20you%20detect%20if%20a%20tree%20is%20tall%20or%20short%20without%20other%20trees%20around%3F%20(just%20throwing%20some%20humor%20into%20the%20convo)%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2361391%22%20slang%3D%22en-US%22%3ERe%3A%20Duda%20con%20Formula%20de%20Excel%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2361391%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1052925%22%20target%3D%22_blank%22%3E%40AdminLirios%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ESorry%2C%20I%20don't%20know%20how%20it%20shall%20be%20in%20Spanish%20version.%20In%20English%20version%20it%20is%20used%203%20letters%20for%20weekday%20and%20formula%20compares%203%20characters.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22image.png%22%20style%3D%22width%3A%20781px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F281086i73A847DB6495B630%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22image.png%22%20alt%3D%22image.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2362299%22%20slang%3D%22en-US%22%3ERe%3A%20Duda%20con%20Formula%20de%20Excel%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2362299%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1052925%22%20target%3D%22_blank%22%3E%40AdminLirios%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHere%20are%20some%20tools%20for%20you%20to%20figure%20out%20formulas%20to%20your%20calendar%20matrix%3A%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Yea_So_0-1621284266335.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F281287i0FF22F0FDDC6779D%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Yea_So_0-1621284266335.png%22%20alt%3D%22Yea_So_0-1621284266335.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2357639%22%20slang%3D%22en-US%22%3ERe%3A%20Duda%20con%20Formula%20de%20Excel%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2357639%22%20slang%3D%22en-US%22%3EI%20see%20the%20formula%20is%20referencing%20C5%20in%20a%20left%20function%20which%20is%20the%20cell%20for%20domingo%20in%20the%20calendar%2C%20does%20the%20formula%20live%20in%20cell%20C3%3F%3CBR%20%2F%3E%3CBR%20%2F%3Ewhich%20cell%20does%20this%20formula%20live%20in%3F%3CBR%20%2F%3EYes.%20ERROR(SI(TEXT(DATE(Calendar_Year%3B%20FILA(%24A%201)%3B1)%3B%22%20ddd%22)-LEFT(C%245%3B2)%3B%20DATE(Calendar_Year%3B%20FILA(%24A%201)%3B1)%3B%22%22)%3B%22%22)%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2362636%22%20slang%3D%22en-US%22%3ERe%3A%20Duda%20con%20Formula%20de%20Excel%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2362636%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1052925%22%20target%3D%22_blank%22%3E%40AdminLirios%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHere's%20how%20far%20I%20got%20to%20for%20the%20answer%20to%20that%20question%3A%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Yea_So_0-1621292024476.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F281359i408CBF3E15263C26%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Yea_So_0-1621292024476.png%22%20alt%3D%22Yea_So_0-1621292024476.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3EThe%20other%20Lookup%20Tables%3A%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Yea_So_0-1621292806249.png%22%20style%3D%22width%3A%202160px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F281365i166A84D02BDA3B54%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Yea_So_0-1621292806249.png%22%20alt%3D%22Yea_So_0-1621292806249.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3ESo%20you're%20just%20going%20to%20map%20out%20the%20first%20weeks%20of%20the%20month%2C%20and%20the%20formula%20will%20be%3A%3C%2FP%3E%3CP%3E%3DIF(C%244%3D%24J6%2C1%2CThen%20do%20something%20else)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2362786%22%20slang%3D%22en-US%22%3ERe%3A%20Duda%20con%20Formula%20de%20Excel%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2362786%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1052925%22%20target%3D%22_blank%22%3E%40AdminLirios%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHere%20is%20the%20workbook%20with%20the%20Tools%2C%20Mapping%20and%20a%20Test%20Calendar%20to%20apply%20the%20mapping%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Echeers%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2360534%22%20slang%3D%22es-ES%22%3ERe%3A%20Doubt%20with%20Excel%20Formula%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2360534%22%20slang%3D%22es-ES%22%3EThank%20you!%20right%2C%20so%20what%20would%20be%20the%20value%20I%20should%20modify%20to%20detect%20the%20first%20week%2C%20because%20I%20write%20in%20the%20cells%20indicated%20there%20and%20it%20does%20not%20return%20any%20results%20to%20me!!%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2363712%22%20slang%3D%22en-US%22%3ERe%3A%20Duda%20con%20Formula%20de%20Excel%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2363712%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1052925%22%20target%3D%22_blank%22%3E%40AdminLirios%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EI'd%20return%20back%20initial%20formulas%20as%20in%20original%20templates%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-excel%22%3E%3CCODE%3Efor%20the%20first%207%20days%0A%3DIFERROR(IF(LEFT(TEXT(DATE(Calendar_Year%2CROW(%24A1)%2C1)%2C%22%5B%24-es-ES%5Dddd%22)%2C2)%3DLEFT(C%245%2C2)%2CDATE(Calendar_Year%2CROW(%24A1)%2C1)%2CIF(B6%26gt%3B%3D1%2CB6%2B1%2C%22%22))%2C%22%22)%0A%0Ain%20between%0A%3DIFERROR(IF(I6%26gt%3B%3D1%2CI6%2B1%2C%22%22)%2C%22%22)%0A%0Afor%20last%207%20days%0A%3DIFERROR(IF(AND(AK6%26gt%3B%3D1%2CAK6%2B1%26lt%3B%3DDATE(Calendar_Year%2CROW(%24A1)%2B1%2C0))%2CAK6%2B1%2C%22%22)%2C%22%22)%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3EWhen%20it%20shows%20correctly%20off-days%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22image.png%22%20style%3D%22width%3A%20686px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F281470i88F560FC33BD55B4%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22image.png%22%20alt%3D%22image.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3Eand%20summary%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22image.png%22%20style%3D%22width%3A%20951px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F281471iD7E6F0352AFE892E%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22image.png%22%20alt%3D%22image.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2364822%22%20slang%3D%22es-ES%22%3ERe%3A%20Doubt%20with%20Excel%20Formula%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2364822%22%20slang%3D%22es-ES%22%3EGreat%2C%20Thank%20you%20very%20much%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2366195%22%20slang%3D%22en-US%22%3ERe%3A%20Duda%20con%20Formula%20de%20Excel%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2366195%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1052925%22%20target%3D%22_blank%22%3E%40AdminLirios%3C%2FA%3E%26nbsp%3B%2C%20you%20are%20welcome%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2366304%22%20slang%3D%22en-US%22%3ERe%3A%20Duda%20con%20Formula%20de%20Excel%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2366304%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F521%22%20target%3D%22_blank%22%3E%40Sergei%20Baklan%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20was%20merely%20trying%20to%20answer%20the%20question%3A%3C%2FP%3E%3CPRE%3E%3CSPAN%3Eso%20what%20would%20be%20the%20value%20I%20should%20modify%20to%20detect%20the%20first%20week%2C%20because%20I%20write%20in%20the%20cells%3CBR%20%2F%3E%20indicated%20there%20and%20it%20does%20not%20return%20any%20results%20to%20me!!%3C%2FSPAN%3E%3C%2FPRE%3E%3CP%3Eand%20that%20was%20the%20answer%20to%20the%20question%20asserted%20above%2C%20and%20not%20to%20advise%20whether%20or%20not%20to%20use%20the%20template%20as%20is.%26nbsp%3B%20I%20was%20assuming%20the%20user%20had%20other%20operations%20or%20procedures%20that%20cannot%20be%20accomplished%20by%20using%20a%20constant%20date.%20I%20hope%20that%20my%20response%20answered%20the%20question%20above.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2366687%22%20slang%3D%22en-US%22%3ERe%3A%20Duda%20con%20Formula%20de%20Excel%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2366687%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F521%22%20target%3D%22_blank%22%3E%40Sergei%20Baklan%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAll%20Spanish%20based%20days%20are%20the%20same%3A%3C%2FP%3E%3CDIV%3E%3CDIV%20class%3D%22css-52%20%22%3E%3CDIV%20class%3D%22ts-pivot-lookup-component%22%3E%3CDIV%20class%3D%22ms-Grid%20ts-grid%22%3E%3CDIV%20class%3D%22ms-Grid-row%22%3E%3CDIV%20class%3D%22ts-textfield-container%20ts-larger-font%22%3E%3CDIV%20class%3D%22ts-alignment-view-container%22%3E%3CDIV%20class%3D%22ts-alignment-view%20%20ms-font-m%20ts-alignment-view-tgt%20ts-ltr-left-zero%22%3E%3CDIV%3E%3CSPAN%20class%3D%22ts-alignment-element%22%3EDomingo%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22ts-alignment-element%22%3ELunes%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22ts-alignment-element-highlighted%22%3EMartes%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22ts-alignment-element%22%3EMi%C3%A9rcoles%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22ts-alignment-element%22%3EJueves%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22ts-alignment-element%22%3EViernes%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22ts-alignment-element%22%3ES%C3%A1bado%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%20class%3D%22ts-alignment-element%22%3Eand%20even%20if%20the%20whole%20day%20word%20is%20used%20the%20left(text%2C2)%20statement%20will%20always%20return%20a%20DO%20irregardless%20of%20what%20the%20language%20locale%20is%20if%20it%20is%20a%20Spanish%20speaking%20locale%20that%20is.%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%20class%3D%22ts-alignment-element%22%3EI%20know%20this%20because%20in%20my%20dialect%20we%20use%20the%20same%20day%20names%20as%20in%20Spanish%20speaking%20locales%2C%20so%20the%20formula%20in%20the%20template%20is%20good%20as%20gold%20as%20is.%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%20class%3D%22ts-alignment-element%22%3ESo%20user%20asked%20the%20question%3A%26nbsp%3B%3C%2FSPAN%3E%3C%2FDIV%3E%3CPRE%3E%3CSPAN%20class%3D%22ts-alignment-element%22%3Eso%20what%20would%20be%20the%20value%20I%20should%20modify%20to%20detect%20the%20first%20week%3C%2FSPAN%3E%3C%2FPRE%3E%3CDIV%3E%3CSPAN%20class%3D%22ts-alignment-element%22%3EWith%20the%20assumption%20that%20the%20existing%20formula%20to%20day%20two%20of%20the%20first%20week%20is%20golden%2C%20the%20answer%20to%20that%20question%20is%20to%20delete%20the%20first%20day%20date%20of%20the%20first%20week%20of%20each%20month.%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%20class%3D%22ts-alignment-element%22%3EFor%20example%20in%20January%20in%20the%20calendar%20template%201%2F1%2F21%20falls%20on%20a%20Friday%20the%201%2F1%2F22%20falls%20on%20a%20Saturday%2C%20then%20figure%20out%20which%20day%20%3CU%3Ename%3C%2FU%3E%20it%20falls%20on%20in%20the%20following%20year%20and%20populate%20the%20first%20days%20of%20each%20of%20the%20first%20week%20in%26nbsp%3Beach%20month%20in%20order%20for%20the%20existing%20formula%20to%20work%20its%20magic.%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3E%3CSPAN%20class%3D%22ts-alignment-element%22%3E%3CSPAN%20class%3D%22ts-alignment-element%22%3ESince%20the%20value%20in%20the%20cell%20of%20the%20first%20day%20of%20the%20first%20week%20for%20each%20month%20is%20a%20%3CU%3Econstant%3C%2FU%3E%20and%20not%20a%20formula%2C%20I%20had%20to%20illustrate%20it%20using%20excel%2C%26nbsp%3B%3C%2FSPAN%3E%3C%2FSPAN%3Eit%20would%20be%20long%20and%20tedious%20to%20explain.%20Try%20explaining%20to%20someone%20how%20to%20peel%20a%20banana%20using%20programming%20language.%3CDIV%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FDIV%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%20class%3D%22ts-alignment-element%22%3EW%3C%2FSPAN%3E%3CSPAN%20class%3D%22ts-alignment-element%22%3Ehen%20you%20point%20out%20that%20it%20has%20to%20do%20with%20locales%2C%20what%20does%20locales%20have%20to%20do%20with%20constant%20values%3F%20If%20the%20date%20is%20a%20constant%20value%20of%201%2F1%2F21%2C%20what%20locale%20should%20anyone%20use%3F%20%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2366442%22%20slang%3D%22en-US%22%3ERe%3A%20Duda%20con%20Formula%20de%20Excel%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2366442%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1047584%22%20target%3D%22_blank%22%3E%40Yea_So%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EFormula%20didn't%20work%20since%20template%20assumed%20Spanish%20which%20was%20not%20exactly%20the%20same%20as%20local%20on%20user%20machine.%20For%20example%2C%20in%20Spanish-Spain%20%3DTEXT(date%2C%22ddd%22)%20returns%20weekday%20as%20%22DO.%22%2C%20Spanish-Chile%26nbsp%3B%22DOM.%22%2C%20etc.%20and%20template%20assumes%20it%20shall%20be%20%22DO%22%3C%2FP%3E%0A%3CP%3EIf%20correct%20this%20like%20%3DLEFT(TEXT(date%2C%22ddd%22)%2C2)%20template%20works%20fine%2C%20that%20was%20the%20only%20issue%20with%20it.%20With%20this%20small%20correction%20template%20automatically%20detects%20first%20week.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EPerhaps%20better%20to%20download%20template%20localized%20for%20exactly%20this%20language%20or%20we%20may%20play%20with%20locale%20on%20PC%2C%20with%20that%20initial%20template%20shall%20work%20from%20the%20box.%3C%2FP%3E%0A%3CP%3ESorry%2C%20I%20know%20no%20one%20word%20in%20Spanish%20and%20have%20no%20idea%20which%20exactly%20Spanish%20is%20required.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2369233%22%20slang%3D%22en-US%22%3ERe%3A%20Duda%20con%20Formula%20de%20Excel%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2369233%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1047584%22%20target%3D%22_blank%22%3E%40Yea_So%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ESpanish%20-%20yes%2C%20maybe.%20I%20only%20know%20that%20for%20different%20Spanish%20locales%20Excel%20returns%20different%20texts%2C%20e.g.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22image.png%22%20style%3D%22width%3A%20323px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F281890i92A03F0302F6D645%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22image.png%22%20alt%3D%22image.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EAs%20for%20template%20itself%20-%20yes%2C%20that%20could%20be%20done%20by%20different%20ways.%20However%2C%20this%20template%20is%20known%20for%20several%20years%20and%20used%20by%20many%20people%20in%20different%20countries%2C%20without%20need%20it's%20better%20not%20to%20change%20the%20logic%20of%20formulas%20used%20in%20this%20template.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2369367%22%20slang%3D%22en-US%22%3ERe%3A%20Duda%20con%20Formula%20de%20Excel%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2369367%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F521%22%20target%3D%22_blank%22%3E%40Sergei%20Baklan%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%3E%3CSPAN%3EAs%20for%20template%20itself%20-%20yes%2C%20that%20could%20be%20done%20by%20different%20ways.%20However%2C%20this%20template%20is%20known%20for%20several%20years%3CBR%20%2F%3E%20and%20used%20by%20many%20people%20in%20different%20countries%2C%20without%20need%20it's%20better%20not%20to%20change%20the%20logic%20of%20formulas%20used%3CBR%20%2F%3E%20in%20this%20template.%3C%2FSPAN%3E%3C%2FPRE%3E%3CP%3EI%20do%20not%20subscribe%20to%20the%20paradigm%20you%20mentioned%20above%2C%20I%20only%20try%20to%20answer%20the%20question%20asked%20by%20the%20user%20if%20I%20know%20of%20a%20way%20to%20do%20it%20to%20guide%20them%20in%20whatever%20solution%20a%20user%20might%20be%20seeking.%26nbsp%3B%20I%20am%20not%20a%20warden%20to%20the%20Microsoft%20template.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2380773%22%20slang%3D%22es-ES%22%3ERe%3A%20Doubt%20with%20Excel%20Formula%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2380773%22%20slang%3D%22es-ES%22%3EGreat%20answers%2C%20very%20grateful%20for%20both%20of%20us.%20are%20top%20of%20excel%2C%20they%20gave%20me%20the%20answers%20sought.%20Happy%20day.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2381803%22%20slang%3D%22en-US%22%3ERe%3A%20Duda%20con%20Formula%20de%20Excel%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2381803%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1052925%22%20target%3D%22_blank%22%3E%40AdminLirios%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20mapping%20was%20just%20an%20illustration%20on%20how%20you%20can%20create%20a%20map%20table%20of%20the%20whole%20first%20week.%20So%20you%20can%20create%20a%20table%20map%20for%20the%20first%20week%20to%20figure%20out%20where%20the%20first%20day%20of%20each%20month%20will%20fall%20on%20which%20week%20day%20name%20it%20will%20be%20to%20figure%20out%20where%20each%20first%20day%20of%20the%20week%20will%20be%20marked%20as%20Enero%201%2C%20Febrero%201%2C%20Marzo%201%2C%20Abril%201....etc.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Contributor

Estimada comunidad, gusto en saludarlos y les deseo éxitos en sus funciones / emprendimientos.

Traigo a colación la utilización de la siguiente formula: 

=SI.ERROR(SI(TEXTO(FECHA(Calendar_Year;FILA($A1);1);"ddd")=IZQUIERDA(C$5;2);FECHA(Calendar_Year;FILA($A1);1);"");"")

 

Esta formula esta en una plantilla de excel sobre el registro de asistencia de empleados, su instrucción no esta muy clara, por ello acudo a ustedes, estaré super agradecido si me explican como la debo aplicar, que valor es que debo cambiar.

 

Atento

22 Replies
Which template are you using and what is the expected result of that formula, please share more information
En el adjunto del mensaje esta el archivo que estoy utilizando. Gracias
I see the formula is referencing C5 in a left function which is the cell for domingo in the calendar, does the formula live in cell C3?

which cell does this formula live in?
Yes. ERROR(SI(TEXT(DATE(Calendar_Year; FILA($A 1);1);" ddd")-LEFT(C$5;2); DATE(Calendar_Year; FILA($A 1);1);"");"")
best response confirmed by AdminLirios (Occasional Contributor)
Solution

Hi @AdminLirios 

The formula below will add 2 if the day was Saturday, 1 if the day was Sunday otherwise just return today's date:

 

=IF(TEXT(DATE(YEAR(TODAY()),MONTH(TODAY()),DAY(TODAY())),"ddd")="Sat",DATE(YEAR(TODAY()),MONTH(TODAY()),DAY(TODAY()))+2,IF(TEXT(DATE(YEAR(TODAY()),MONTH(TODAY()),DAY(TODAY())),"ddd")="Sun",DATE(YEAR(TODAY()),MONTH(TODAY()),DAY(TODAY()))+1,DATE(YEAR(TODAY()),MONTH(TODAY()),DAY(TODAY()))))

 

Your Formula:

ERROR(SI(
TEXT(
DATE(Calendar_Year; FILA($A 1);1);
" ddd")-LEFT(C$5;2); DATE(Calendar_Year; FILA($A 1);1);"");"")

Your formula translated:

=IFERROR(TEXT(DATE(Calendar_Year, MONTH(NOW()),,1)," ddd")-LEFT(C$5,2), DATE(Calendar_Year, MONTH(NOW()),1),"")

 

TEXT(DATE(Calendar_Year,Month(NOW()),1)," ddd") RETURNS A = Sat LEFT(C5,2) RETURNS A = DO

your formula is stating Sat minus Do at this point in your formula
TEXT(DATE(Calendar_Year,Month(NOW()),1)," ddd")-LEFT(C$5,2) RETURNS A = #VALUE!

as soon as your formula subtracts Sat from Do it starts to error out

I'm not really sure what FILA($A 1)statement in your formula is, but since it is inside the DATE Function: DATE(YEAR(),MONTH(),1)

I'm going to assume its trying to get some kind of a month for a value

I am going to assume that your date formula is trying to do a date math to skip domingo because the work week never includes a Sunday, is this a correct assumption?

@AdminLirios 

That is well known Microsoft template, I'd don't modify the formulas in it without strong need. The only it's language specific. If formula doesn't detect first date of the month that most probably means in your locale and in template short names of week days are different.

Thank you, Yes Sir
Yes, thank you very much.....
Gracias! correcto, entonces cual seria el valor que debería modificar para que detecte la primera semana, porque escribo en las celdas que allí se indican y no me devuelve algún resultado!!

Looking at your workbook, in the calendar it only has days of the week i.e. Lunes, martes, miércoles, jueves y viernes, but no actual date, so how do you detect if a tree is tall or short without other trees around? (just throwing some humor into the convo)

@AdminLirios 

Sorry, I don't know how it shall be in Spanish version. In English version it is used 3 letters for weekday and formula compares 3 characters.

image.png

 

Hi @AdminLirios 

Here's how far I got to for the answer to that question:

Yea_So_0-1621292024476.png

The other Lookup Tables:

Yea_So_0-1621292806249.png

So you're just going to map out the first weeks of the month, and the formula will be:

=IF(C$4=$J6,1,IF(AND(ISNUMBER(B6),B6>=1),B6+1,""))

Yea_So_0-1621297316158.png

 

Hi @AdminLirios 

Here is the workbook with the Tools, Mapping and a Test Calendar to apply the mapping

 

cheers

@AdminLirios 

I'd return back initial formulas as in original templates

for the first 7 days
=IFERROR(IF(LEFT(TEXT(DATE(Calendar_Year,ROW($A1),1),"[$-es-ES]ddd"),2)=LEFT(C$5,2),DATE(Calendar_Year,ROW($A1),1),IF(B6>=1,B6+1,"")),"")

in between
=IFERROR(IF(I6>=1,I6+1,""),"")

for last 7 days
=IFERROR(IF(AND(AK6>=1,AK6+1<=DATE(Calendar_Year,ROW($A1)+1,0)),AK6+1,""),"")

When it shows correctly off-days

image.png

and summary

image.png

 

Great, Thank you very much

@AdminLirios , you are welcome

@Sergei Baklan 

 

I was merely trying to answer the question:

so what would be the value I should modify to detect the first week, because I write in the cells
indicated there and it does not return any results to me!!

and that was the answer to the question asserted above, and not to advise whether or not to use the template as is.  I was assuming the user had other operations or procedures that cannot be accomplished by using a constant date. I hope that my response answered the question above. 

@Yea_So 

Formula didn't work since template assumed Spanish which was not exactly the same as local on user machine. For example, in Spanish-Spain =TEXT(date,"ddd") returns weekday as "DO.", Spanish-Chile "DOM.", etc. and template assumes it shall be "DO"

If correct this like =LEFT(TEXT(date,"ddd"),2) template works fine, that was the only issue with it. With this small correction template automatically detects first week.

 

Perhaps better to download template localized for exactly this language or we may play with locale on PC, with that initial template shall work from the box.

Sorry, I know no one word in Spanish and have no idea which exactly Spanish is required.

Hi @Sergei Baklan 

 

All Spanish based days are the same:

Domingo Lunes Martes Miércoles Jueves Viernes Sábado
and even if the whole day word is used the left(text,2) statement will always return a DO irregardless of what the language locale is if it is a Spanish speaking locale that is.
I know this because in my dialect we use the same day names as in Spanish speaking locales, so the formula in the template is good as gold as is.
So user asked the question: 
so what would be the value I should modify to detect the first week
With the assumption that the existing formula to day two of the first week is golden, the answer to that question is to delete the first day date of the first week of each month.
For example in January in the calendar template 1/1/21 falls on a Friday the 1/1/22 falls on a Saturday, then figure out which day name it falls on in the following year and populate the first days of each of the first week in each month in order for the existing formula to work its magic.
 
Since the value in the cell of the first day of the first week for each month is a constant and not a formula, I had to illustrate it using excel, it would be long and tedious to explain. Try explaining to someone how to peel a banana using programming language.
 
When you point out that it has to do with locales, what does locales have to do with constant values? If the date is a constant value of 1/1/21, what locale should anyone use?
 

@Yea_So 

Spanish - yes, maybe. I only know that for different Spanish locales Excel returns different texts, e.g.

image.png

As for template itself - yes, that could be done by different ways. However, this template is known for several years and used by many people in different countries, without need it's better not to change the logic of formulas used in this template.