SOLVED

Attendance Team and manager wise

%3CLINGO-SUB%20id%3D%22lingo-sub-2110800%22%20slang%3D%22en-US%22%3EAttendance%20Team%20and%20manager%20wise%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2110800%22%20slang%3D%22en-US%22%3E%3CP%3EAttached%20the%20sample%20attendance%20sheet%2C%20I%20need%20the%20attendance%20list%20team%20wise%20daily%20and%20lead%20wise%20present%20data.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CTABLE%20width%3D%22367%22%3E%0A%3CTBODY%3E%0A%3CTR%3E%0A%3CTD%20rowspan%3D%222%22%20width%3D%22111%22%3ENAME%20OF%20EMP%3C%2FTD%3E%0A%3CTD%20rowspan%3D%222%22%20width%3D%2264%22%3ETeam%3C%2FTD%3E%0A%3CTD%20rowspan%3D%222%22%20width%3D%2264%22%3ELead%3C%2FTD%3E%0A%3CTD%20width%3D%2264%22%3E01%3C%2FTD%3E%0A%3CTD%20width%3D%2264%22%3E02%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%3EFri%3C%2FTD%3E%0A%3CTD%3ESat%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%3EKamal%20Krishnan%3C%2FTD%3E%0A%3CTD%3EA%3C%2FTD%3E%0A%3CTD%3EX%3C%2FTD%3E%0A%3CTD%3EHOL%3C%2FTD%3E%0A%3CTD%3EWO%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%3ERupa%20Sen%3C%2FTD%3E%0A%3CTD%3EA%3C%2FTD%3E%0A%3CTD%3EX%3C%2FTD%3E%0A%3CTD%3EHOL%3C%2FTD%3E%0A%3CTD%3EWO%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%3EResham%20Bahadur%3C%2FTD%3E%0A%3CTD%3Eb%3C%2FTD%3E%0A%3CTD%3EY%3C%2FTD%3E%0A%3CTD%3E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A%3CTD%3E%26nbsp%3B%3C%2FTD%3E%0A%3CTD%3E%26nbsp%3B%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3C%2FTBODY%3E%0A%3C%2FTABLE%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2110800%22%20slang%3D%22en-US%22%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-2113964%22%20slang%3D%22en-US%22%3ERe%3A%20Attendance%20Team%20and%20manager%20wise%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2113964%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F214174%22%20target%3D%22_blank%22%3E%40Peter%20Bartholomew%3C%2FA%3E%26nbsp%3B%2C%20yes%20recursion%20with%20lambdas%20is%20not%20the%20easiest%20way%20to%20edit%20and%20debug%2C%20even%20if%20with%20some%20tricks%20is%20possible%20to%20do%20with%20in-cell%20edit%20mode.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2111844%22%20slang%3D%22en-US%22%3ERe%3A%20Attendance%20Team%20and%20manager%20wise%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2111844%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F400991%22%20target%3D%22_blank%22%3E%40resham1985%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20attached%20is%20your%20problem%20but%20the%20solution%20uses%20new%20methods%20only%20available%20in%20Excel%20365%20beta.%26nbsp%3B%20The%20recursion%20required%20to%20perform%20the%20calculations%20for%20each%20of%2031%20days%20as%20a%20single%20calculation%20is%20the%20sort%20of%20stuff%20that%20fries%20ones%20brain%20so%20I%20urge%20you%20not%20to%20pay%20it%20too%20much%20attention.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%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%3EI%20had%20to%20try%20to%20fight%20this%20one%20through%20as%20a%20single%20recursive%20Lambda%20function.%26nbsp%3B%20That%20it%20is%20possible%20is%20interesting%2C%20but%20I%20really%20struggle%20getting%20my%20senile%20brain%20round%20the%20challenges%20of%20recursion!%26nbsp%3B%20I%20am%20hoping%20that%20a%20future%20MAP%20function%20might%20make%20the%20application%20of%20Lambda%20functions%20to%20arrays%20much%20easier.%26nbsp%3B%20Maybe%20I%20should%20take%20some%20Python%20or%20Haskell%20training%20if%20I%20am%20going%20to%20get%20a%20grip%20on%20this.%26nbsp%3B%20My%20FORTRAN%20days%20do%20not%20stand%20me%20in%20good%20stead!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%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%20845px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F251557i570263C54393472D%2Fimage-size%2Flarge%3Fv%3D1.0%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%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2111357%22%20slang%3D%22en-US%22%3ERe%3A%20Attendance%20Team%20and%20manager%20wise%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2111357%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F214174%22%20target%3D%22_blank%22%3E%40Peter%20Bartholomew%3C%2FA%3E%26nbsp%3B%2C%20you%20are%20organised%20person%20with%20great%20skills.%20If%20average%20Joe%20instead%20of%3C%2FP%3E%0A%3CP%3E%3CSPAN%3E%3D%20PrettyPollyGrossProfit%20%2B%20ThirstyFerretNetProfit%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3Ewill%20use%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3E%3D%20Profit1%20%2B%20Profit2%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3Ethat%20won't%20help%20in%20understanding%20the%20logic.%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2111326%22%20slang%3D%22en-US%22%3ERe%3A%20Attendance%20Team%20and%20manager%20wise%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2111326%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%3EYou%20have%20a%20point.%26nbsp%3B%20Whereas%20conventional%20spreadsheets%20require%20the%20reader%20to%20follow%20each%20precedent%20and%20look%20for%20adjacent%20annotation%2C%20names%20are%20better%20understood%20by%20referring%20to%20the%20documentation.%26nbsp%3B%20That%20begs%20the%20question%20of%20'is%20there%20any%20documentation%3F'%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20used%20to%20find%20reading%20a%20spreadsheet%20rather%20like%20reading%20a%20message%20written%20in%20a%20Caesar%20Cipher.%26nbsp%3B%20The%20encryption%20rules%20are%20simple%20enough%20but%20it%20still%20makes%20the%20message%20difficult%20to%20read.%26nbsp%3B%20My%20normal%20process%20was%20to%20decode%20one%20reference%20at%20a%20time%20and%20name%20it%20.%26nbsp%3B%20By%20the%20time%20I%20had%20named%20every%20reference%2C%20I%20most%20likely%20understood%20the%20workbook.%26nbsp%3B%20What%20that%20did%20not%20answer%2C%20was%20the%20question%20'given%20a%20workbook%20built%20from%20defined%20names%20in%20the%20first%20place%20(where%20the%20naming%20convention%20might%20be%20idiosyncratic)%2C%20could%20I%20do%20any%20better%3F%26nbsp%3B%20I%20believe%20the%20process%20is%2C%20in%20essence%2C%20to%20build%20the%20missing%20documentation.%26nbsp%3B%20For%20each%20name%2C%20I%20want%20to%20know%3A%20what%20business%20object%20does%20it%20represent%3B%20how%20it%20is%20calculated%3B%20what%20is%20its%20intended%20use%3B%20and%2C%20less%20importantly%2C%20where%20are%20any%20range%20references%20located%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3BI%20have%20a%20copy%20of%20an%20academic%20paper%20which%20asserts%20that%20names%20are%20useless%20as%20a%20device%20for%20reducing%20spreadsheet%20risk.%26nbsp%3B%20It%20turned%20out%20that%20the%20experiments%20were%20to%20test%20the%20accuracy%20with%20which%20students%20could%20reproduce%20a%20series%20of%20formulae%20such%20as%3C%2FP%3E%3CP%3E%3D%20PrettyPollyGrossProfit%20%2B%20ThirstyFerretNetProfit%3C%2FP%3E%3CP%3EMy%20immediate%20thoughts%20were%20why%20is%20one%20company's%20gross%20profit%20being%20added%20to%20a%20net%20profit%3F%26nbsp%3B%20Why%20proliferate%20Names%3F%26nbsp%3B%20Wouldn't%20the%20structure%20of%20the%20data%20be%20improved%20by%20having%20a%20defined%20name%2C%20CompanyName%2C%20with%20the%20individual%20names%20as%20text%20data%20values%3F%26nbsp%3B%20One%20then%20has%20meaningful%20relationships%20between%20GrossProfit%20and%20NetProfit%20that%20apply%20across%20all%20companies.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAll%20of%20which%20suggests%20a%20level%20of%20planning%20that%20is%20alien%20to%20spreadsheet%20development.%26nbsp%3B%20There%20the%20strategy%20is%20more%20one%20of%20rushing%20in%2C%20getting%20the%20job%20done%20and%20sorting%20the%20errors%20later.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2111110%22%20slang%3D%22en-US%22%3ERe%3A%20Attendance%20Team%20and%20manager%20wise%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2111110%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F214174%22%20target%3D%22_blank%22%3E%40Peter%20Bartholomew%3C%2FA%3E%26nbsp%3B%2C%20in%20general%20you%20are%20right%20with%20exhortation%20to%20use%2C%20I%20can't%20say%20more%20advanced%2C%20but%20more%20systematic%20style%20of%20work%20in%20Excel.%20But%20everything%20depends%20on%20concrete%20case.%20If%20people%20are%20more%20comfortable%20with%20with%20relative%2Fabsolute%20references%20-%20why%20not.%20On%20the%20other%20hand%20I%20remember%20the%20case%20when%20tried%20to%20fix%20an%20error%20in%20the%20file%20with%20few%20dozens%20of%20named%20ranges%20and%20formulas%2C%20and%20that%20only%20for%20author%20was%20obvious%20what%20each%20name%20means.%20Spent%20lot%20of%20time%20with%20that%2C%20I%20believe%20with%20usual%20references%20what%20could%20be%20done%20much%20faster.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2111083%22%20slang%3D%22en-US%22%3ERe%3A%20Attendance%20Team%20and%20manager%20wise%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2111083%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F214174%22%20target%3D%22_blank%22%3E%40Peter%20Bartholomew%3C%2FA%3E%26nbsp%3BThank%20you%20Peter%20for%20your%20help.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EYou%20both%20quickly%20helped%20me%20and%20got%20to%20learn%20new%20things.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2111071%22%20slang%3D%22en-US%22%3ERe%3A%20Attendance%20Team%20and%20manager%20wise%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2111071%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F400991%22%20target%3D%22_blank%22%3E%40resham1985%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20didn't%20attach%20the%20workbook%20because%20I%20didn't%20know%20at%20that%20stage%20in%20the%20discussion%20that%20you%20could%20use%20the%20XLOOKUP%20function%20or%20the%20'%40'%20operator.%26nbsp%3B%20Named%20Ranges%20have%20been%20around%20since%20Excel%20was%20first%20ported%20to%20DOS.%3C%2FP%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%3EThank%20you%20for%20tidying%20up%20after%20me!%26nbsp%3B%20Not%20fair%20on%20you%20though.%26nbsp%3B%20I%20once%20posted%20on%20the%20Chandoo%20forum%20that%20the%20A1%20notation%20and%20the%20practice%20of%20copying%20single-cell%20relative%20references%20were%20abominations%20that%20should%20never%20have%20entered%20the%20world%20of%20serious%20computing.%26nbsp%3B%20I%20can%20safely%20say%20that%20it%20did%20not%20meet%20with%20overwhelming%20support%20and%20the%20spreadsheet%20world%20and%20I%20agreed%20to%20part%20ways.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20holding%20off%20recommending%20recursive%20Lambdas%20as%20an%20alternative%20to%20the%20concept%20of%20relative%20referencing%20though%3B%20the%20latter%20may%20be%20a%20mess%20to%20define%20but%20the%20former%20is%20mind-numbingly%20contorted.%26nbsp%3B%20There%20seems%20to%20be%20more%20to%20support%20array%20processing%20in%20the%20pipeline%20though.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2110995%22%20slang%3D%22en-US%22%3ERe%3A%20Attendance%20Team%20and%20manager%20wise%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2110995%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F400991%22%20target%3D%22_blank%22%3E%40resham1985%3C%2FA%3E%26nbsp%3B%2C%20you%20are%20welcome%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2110989%22%20slang%3D%22en-US%22%3ERe%3A%20Attendance%20Team%20and%20manager%20wise%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2110989%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%3BThank%20you%20for%20your%20help.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2110960%22%20slang%3D%22en-US%22%3ERe%3A%20Attendance%20Team%20and%20manager%20wise%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2110960%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F400991%22%20target%3D%22_blank%22%3E%40resham1985%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThat%20could%20be%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-excel%22%3E%3CCODE%3E%3DCOUNTIFS(XLOOKUP(B%2415%2C%24D%241%3A%24AH%241%2C%24D%243%3A%24AH%2414)%2C%22P%22%2C%24B%243%3A%24B%2414%2C%24A16)%0A%0Aand%0A%0A%3DCOUNTIFS(XLOOKUP(B%2422%2C%24D%241%3A%24AH%241%2C%24D%243%3A%24AH%2414)%2C%22P%22%2C%24C%243%3A%24C%2414%2C%24A23)%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3Edrag%20them%20to%20the%20right%20and%20down%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2110948%22%20slang%3D%22en-US%22%3ERe%3A%20Attendance%20Team%20and%20manager%20wise%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2110948%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F214174%22%20target%3D%22_blank%22%3E%40Peter%20Bartholomew%3C%2FA%3E%26nbsp%3BCould%20you%20please%20forward%20me%20the%20excel%20sheet%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EWhen%20I%20am%20applying%20the%20formula%20mentioned%20I%20am%20getting%20the%20below%20error%3A%20My%20email%20ID%20is%20%3CA%20href%3D%22mailto%3Av-rebaha%40microsoft.com%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ev-rebaha%40microsoft.com%3C%2FA%3E%26nbsp%3Bor%20you%20can%20upload%20the%20excel%20to%20this%20same%20post.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22resham1985_0-1612262062623.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F251307iD6D0031A81B39089%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22resham1985_0-1612262062623.png%22%20alt%3D%22resham1985_0-1612262062623.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-2110940%22%20slang%3D%22en-US%22%3ERe%3A%20Attendance%20Team%20and%20manager%20wise%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2110940%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F400991%22%20target%3D%22_blank%22%3E%40resham1985%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%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%20956px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F251306iBAF5EF112E629B0A%2Fimage-size%2Flarge%3Fv%3D1.0%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%3CP%3EIf%20you%20require%20Counts%2C%20you%20could%20use%20COUNTIFS.%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-excel%22%3E%3CCODE%3E%3D%20COUNTIFS(%20XLOOKUP(%40day%2C%20dayOfMonth%2C%20attendance)%2C%20%22P%22%2C%20Teams%2C%20Team%20)%0A%0A%3D%20COUNTIFS(%20XLOOKUP(%40day%2C%20dayOfMonth%2C%20attendance)%2C%20%22P%22%2C%20Leads%2C%20Lead%20)%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2110934%22%20slang%3D%22en-US%22%3ERe%3A%20Attendance%20Team%20and%20manager%20wise%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2110934%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%0A%3CP%3EI%20need%20the%20sum%20of%20P%20for%20each%20date%20(%20Team%20wise%20and%20Lead%20wise)%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CTABLE%20width%3D%22586%22%3E%0A%3CTBODY%3E%0A%3CTR%3E%0A%3CTD%20rowspan%3D%222%22%20width%3D%22111%22%3ENAME%20OF%20EMP%3C%2FTD%3E%0A%3CTD%20rowspan%3D%222%22%20width%3D%2291%22%3ETeam%3C%2FTD%3E%0A%3CTD%20rowspan%3D%222%22%20width%3D%2264%22%3ELead%3C%2FTD%3E%0A%3CTD%20width%3D%2264%22%3E01-Jan%3C%2FTD%3E%0A%3CTD%20width%3D%2264%22%3E02-Jan%3C%2FTD%3E%0A%3CTD%20width%3D%2264%22%3E03-Jan%3C%2FTD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2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%3EY%3C%2FTD%3E%0A%3CTD%3E0%3C%2FTD%3E%0A%3CTD%3E0%3C%2FTD%3E%0A%3CTD%3E0%3C%2FTD%3E%0A%3CTD%3E7%3C%2FTD%3E%0A%3CTD%3E%26nbsp%3B%3C%2FTD%3E%0A%3CTD%3E%26nbsp%3B%3C%2FTD%3E%0A%3CTD%3E%26nbsp%3B%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3C%2FTBODY%3E%0A%3C%2FTABLE%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2110933%22%20slang%3D%22en-US%22%3ERe%3A%20Attendance%20Team%20and%20manager%20wise%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2110933%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%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2110919%22%20slang%3D%22en-US%22%3ERe%3A%20Attendance%20Team%20and%20manager%20wise%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2110919%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F400991%22%20target%3D%22_blank%22%3E%40resham1985%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ECould%20you%20please%20clarify%20what%20shall%20be%20the%20result%2C%20it%20will%20be%20great%20if%20you%20add%20manually%20for%20one-two%20days.%20Sorry%2C%20I%20didn't%20catch%20what%20exactly%20is%20required.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Microsoft

Attached the sample attendance sheet, I need the attendance list team wise daily and lead wise present data.

 

NAME OF EMP Team Lead 01 02
Fri Sat
Kamal Krishnan A X HOL WO
Rupa Sen A X HOL WO
Resham Bahadur b Y HOL WO
Aman Malik b Y HOL WO
Sujit panannapet C Y HOL WO
sssdf A X HOL WO
sdfsdfsdfsd A Y HOL WO
afsdfsdfsfsd A Y HOL WO
RETDFG B Y HOL WO
THYTUJKI C Y HOL WO
         
         
Team 01 02 03 04
A        
B        
C        
         
         
         
Lead 01 02 03 04
X        
Y        
15 Replies

@resham1985 

Could you please clarify what shall be the result, it will be great if you add manually for one-two days. Sorry, I didn't catch what exactly is required.

@Sergei Baklan 

I need the sum of P for each date ( Team wise and Lead wise)

 

NAME OF EMP Team Lead 01-Jan 02-Jan 03-Jan 04-Jan 05-Jan
Fri Sat Sun Mon Tue
Kamal Krishnan A X HOL WO WO P P
Rupa Sen A X HOL WO WO P P
sssdf A X HOL WO WO P P
sdfsdfsdfsd A Y HOL WO WO P P
afsdfsdfsfsd A Y HOL WO WO P P
               
               
Team 01-Jan 02-Jan 03-Jan 04-Jan 05-Jan 06-Jan 07-Jan
A 0 0 0 5      
B 0 0 0 3      
C 0 0 0 2      
               
               
               
Lead 01-Jan 02-Jan 03-Jan 04-Jan 05-Jan 06-Jan 07-Jan
X 0 0 0 3      
Y 0 0 0 7      

@resham1985 

image.png

If you require Counts, you could use COUNTIFS.

= COUNTIFS( XLOOKUP(@day, dayOfMonth, attendance), "P", Teams, Team )

= COUNTIFS( XLOOKUP(@day, dayOfMonth, attendance), "P", Leads, Lead )

@Peter Bartholomew Could you please forward me the excel sheet

 

When I am applying the formula mentioned I am getting the below error: My email ID is v-rebaha@microsoft.com or you can upload the excel to this same post.

resham1985_0-1612262062623.png

 

best response confirmed by resham1985 (Microsoft)
Solution

@resham1985 

That could be

=COUNTIFS(XLOOKUP(B$15,$D$1:$AH$1,$D$3:$AH$14),"P",$B$3:$B$14,$A16)

and

=COUNTIFS(XLOOKUP(B$22,$D$1:$AH$1,$D$3:$AH$14),"P",$C$3:$C$14,$A23)

drag them to the right and down

@Sergei Baklan Thank you for your help.

@resham1985 , you are welcome

@resham1985 

I didn't attach the workbook because I didn't know at that stage in the discussion that you could use the XLOOKUP function or the '@' operator.  Named Ranges have been around since Excel was first ported to DOS.

@Sergei Baklan 

Thank you for tidying up after me!  Not fair on you though.  I once posted on the Chandoo forum that the A1 notation and the practice of copying single-cell relative references were abominations that should never have entered the world of serious computing.  I can safely say that it did not meet with overwhelming support and the spreadsheet world and I agreed to part ways.

 

I am holding off recommending recursive Lambdas as an alternative to the concept of relative referencing though; the latter may be a mess to define but the former is mind-numbingly contorted.  There seems to be more to support array processing in the pipeline though.

@Peter Bartholomew Thank you Peter for your help.

 

You both quickly helped me and got to learn new things. 

@Peter Bartholomew , in general you are right with exhortation to use, I can't say more advanced, but more systematic style of work in Excel. But everything depends on concrete case. If people are more comfortable with with relative/absolute references - why not. On the other hand I remember the case when tried to fix an error in the file with few dozens of named ranges and formulas, and that only for author was obvious what each name means. Spent lot of time with that, I believe with usual references what could be done much faster.

 

 

@Sergei Baklan 

You have a point.  Whereas conventional spreadsheets require the reader to follow each precedent and look for adjacent annotation, names are better understood by referring to the documentation.  That begs the question of 'is there any documentation?'

 

I used to find reading a spreadsheet rather like reading a message written in a Caesar Cipher.  The encryption rules are simple enough but it still makes the message difficult to read.  My normal process was to decode one reference at a time and name it .  By the time I had named every reference, I most likely understood the workbook.  What that did not answer, was the question 'given a workbook built from defined names in the first place (where the naming convention might be idiosyncratic), could I do any better?  I believe the process is, in essence, to build the missing documentation.  For each name, I want to know: what business object does it represent; how it is calculated; what is its intended use; and, less importantly, where are any range references located?

 

 I have a copy of an academic paper which asserts that names are useless as a device for reducing spreadsheet risk.  It turned out that the experiments were to test the accuracy with which students could reproduce a series of formulae such as

= PrettyPollyGrossProfit + ThirstyFerretNetProfit

My immediate thoughts were why is one company's gross profit being added to a net profit?  Why proliferate Names?  Wouldn't the structure of the data be improved by having a defined name, CompanyName, with the individual names as text data values?  One then has meaningful relationships between GrossProfit and NetProfit that apply across all companies.

 

All of which suggests a level of planning that is alien to spreadsheet development.  There the strategy is more one of rushing in, getting the job done and sorting the errors later.

@Peter Bartholomew , you are organised person with great skills. If average Joe instead of

= PrettyPollyGrossProfit + ThirstyFerretNetProfit

will use

= Profit1 + Profit2

that won't help in understanding the logic.

@resham1985 

The attached is your problem but the solution uses new methods only available in Excel 365 beta.  The recursion required to perform the calculations for each of 31 days as a single calculation is the sort of stuff that fries ones brain so I urge you not to pay it too much attention.

 

@Sergei Baklan 

I had to try to fight this one through as a single recursive Lambda function.  That it is possible is interesting, but I really struggle getting my senile brain round the challenges of recursion!  I am hoping that a future MAP function might make the application of Lambda functions to arrays much easier.  Maybe I should take some Python or Haskell training if I am going to get a grip on this.  My FORTRAN days do not stand me in good stead!

 

image.png

@Peter Bartholomew , yes recursion with lambdas is not the easiest way to edit and debug, even if with some tricks is possible to do with in-cell edit mode.