Help With Language for Function (FIRST POST!!!!)

%3CLINGO-SUB%20id%3D%22lingo-sub-2741975%22%20slang%3D%22en-US%22%3EHelp%20With%20Language%20for%20Function%20(FIRST%20POST!!!!)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2741975%22%20slang%3D%22en-US%22%3E%3CP%3EHey%20Everyone%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI'm%20having%20a%20really%20hard%20time%20writing%20a%20function%20in%20excel%2C%20not%20because%20of%20the%20logic%2C%20but%20rather%20the%20language.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI'm%20trying%20to%20create%20a%20function%20that%20will%20return%20back%20string.%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3CP%3EI'd%20really%20like%20a%20function%20that%20does%20this%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EFunction%20Create_Count_IF(Employee_Name_Range%2C%20Employee_Name%2C%20Measurement%201%2C%20Name_Range%202%2C%20Measurement%202.........Name_Range%20N%2C%20Name_Range%20Measurement%20N)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESo%20in%20the%20example%2C%20I%20want%20to%20tally%20the%20total%20amount%20of%20weeks%20%22Robert%22%20was%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E-Working%20on%20side%20A%3C%2FP%3E%3CP%3E-Working%20in%20conditions%20equal%20to%20or%20hotter%20than%2075%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%2F%2FGrab%20Roberts%20Row%20Positioning%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3CP%3EWeek%201%26nbsp%3B%20%26nbsp%3B%20Week%202%26nbsp%3B%20Week%203%26nbsp%3B%20%26nbsp%3BWeek%204...........%20Week%20N%3C%2FP%3E%3CP%3E%3CFONT%20color%3D%22%23FF6600%22%3E6%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%205%26nbsp%3B%26nbsp%3B%3C%2FFONT%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CFONT%20color%3D%22%23000000%22%3ECreate_Count_IF(Track!A2%3AA7%2C%20%3D%22Robert%22%2C%20Week_1!B2%3AB19%2C%3D%22A%22%2CWeek_1!G2%3A919%2C%26gt%3B%3D75)%3C%2FFONT%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ereturns%20string%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CFONT%20color%3D%22%23000000%22%3ECountIF(%20Week_1!B18%3AB19%2C%3D%22A%22%2CWeek_1!G18%3A19%2C%26gt%3B%3D75)%20%2BCountIF(%20Week_2!B16%3AB17%2C%3D%22A%22%2CWeek_2!G16%3A17%2C%26gt%3B%3D75)%3C%2FFONT%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThere%20is%20currently%203%20sheets%20in%20my%20example%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESheet%201%20(Track)%3C%2FP%3E%3CP%3E-This%20just%20tells%20you%20which%20employee%20shows%20up%20in%20order%20from%20top%20to%20bottom%20in%20each%20week's%20spreadsheet.%26nbsp%3B%3C%2FP%3E%3CTABLE%20width%3D%22385%22%3E%3CTBODY%3E%3CTR%3E%3CTD%20width%3D%22129%22%3EEmployee%20Name%3C%2FTD%3E%3CTD%20width%3D%2264%22%3EWeek%201%3C%2FTD%3E%3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%22798px%22%3E%3CTBODY%3E%3CTR%3E%3CTD%20width%3D%22135px%22%3EEmployee%20Name%3C%2FTD%3E%3CTD%20width%3D%2279px%22%3ESide%20A%20or%20B%3C%2FTD%3E%3CTD%20width%3D%22102px%22%3EAvg%20Heart%20Rate%3C%2FTD%3E%3CTD%20width%3D%22123px%22%3ETotal%20Movement%3C%2FTD%3E%3CTD%20width%3D%22135px%22%3ETotal%20Boxes%20Moved%3C%2FTD%3E%3CTD%20width%3D%22123px%22%3ETime%20of%20Sign%20Out%3C%2FTD%3E%3CTD%20width%3D%22101px%22%3EIndoor%20Temp%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%20width%3D%22135px%22%3EDevin%3C%2FTD%3E%3CTD%20width%3D%2279px%22%3EA%3C%2FTD%3E%3CTD%20width%3D%22102px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22123px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22135px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22123px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22101px%22%3E%26nbsp%3B%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%20width%3D%22135px%22%3EDay%201%3C%2FTD%3E%3CTD%20width%3D%2279px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22102px%22%3E76%3C%2FTD%3E%3CTD%20width%3D%22123px%22%3E10%3C%2FTD%3E%3CTD%20width%3D%22135px%22%3E32%3C%2FTD%3E%3CTD%20width%3D%22123px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22101px%22%3E75%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%20width%3D%22135px%22%3EDay%202%3C%2FTD%3E%3CTD%20width%3D%2279px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22102px%22%3E76%3C%2FTD%3E%3CTD%20width%3D%22123px%22%3E7%3C%2FTD%3E%3CTD%20width%3D%22135px%22%3E29%3C%2FTD%3E%3CTD%20width%3D%22123px%22%3E2%3C%2FTD%3E%3CTD%20width%3D%22101px%22%3E75%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%20width%3D%22135px%22%3EMary%3C%2FTD%3E%3CTD%20width%3D%2279px%22%3EA%3C%2FTD%3E%3CTD%20width%3D%22102px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22123px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22135px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22123px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22101px%22%3E%26nbsp%3B%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%20width%3D%22135px%22%3EDay%201%3C%2FTD%3E%3CTD%20width%3D%2279px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22102px%22%3E75%3C%2FTD%3E%3CTD%20width%3D%22123px%22%3E12%3C%2FTD%3E%3CTD%20width%3D%22135px%22%3E37%3C%2FTD%3E%3CTD%20width%3D%22123px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22101px%22%3E76%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%20width%3D%22135px%22%3EDay%202%3C%2FTD%3E%3CTD%20width%3D%2279px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22102px%22%3E88%3C%2FTD%3E%3CTD%20width%3D%22123px%22%3E13%3C%2FTD%3E%3CTD%20width%3D%22135px%22%3E35%3C%2FTD%3E%3CTD%20width%3D%22123px%22%3E4%3C%2FTD%3E%3CTD%20width%3D%22101px%22%3E76%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%20width%3D%22135px%22%3EAlison%3C%2FTD%3E%3CTD%20width%3D%2279px%22%3EB%3C%2FTD%3E%3CTD%20width%3D%22102px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22123px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22135px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22123px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22101px%22%3E%26nbsp%3B%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%20width%3D%22135px%22%3EDay%201%3C%2FTD%3E%3CTD%20width%3D%2279px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22102px%22%3E77%3C%2FTD%3E%3CTD%20width%3D%22123px%22%3E10%3C%2FTD%3E%3CTD%20width%3D%22135px%22%3E37%3C%2FTD%3E%3CTD%20width%3D%22123px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22101px%22%3E76%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%20width%3D%22135px%22%3EDay%202%3C%2FTD%3E%3CTD%20width%3D%2279px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22102px%22%3E88%3C%2FTD%3E%3CTD%20width%3D%22123px%22%3E11%3C%2FTD%3E%3CTD%20width%3D%22135px%22%3E35%3C%2FTD%3E%3CTD%20width%3D%22123px%22%3E6%3C%2FTD%3E%3CTD%20width%3D%22101px%22%3E76%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%20width%3D%22135px%22%3ECorey%3C%2FTD%3E%3CTD%20width%3D%2279px%22%3EB%3C%2FTD%3E%3CTD%20width%3D%22102px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22123px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22135px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22123px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22101px%22%3E%26nbsp%3B%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%20width%3D%22135px%22%3EDay%201%3C%2FTD%3E%3CTD%20width%3D%2279px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22102px%22%3E69%3C%2FTD%3E%3CTD%20width%3D%22123px%22%3E12%3C%2FTD%3E%3CTD%20width%3D%22135px%22%3E45%3C%2FTD%3E%3CTD%20width%3D%22123px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22101px%22%3E76%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%20width%3D%22135px%22%3EDay%202%3C%2FTD%3E%3CTD%20width%3D%2279px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22102px%22%3E73%3C%2FTD%3E%3CTD%20width%3D%22123px%22%3E9%3C%2FTD%3E%3CTD%20width%3D%22135px%22%3E25%3C%2FTD%3E%3CTD%20width%3D%22123px%22%3E7%3C%2FTD%3E%3CTD%20width%3D%22101px%22%3E76%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%20width%3D%22135px%22%3EShannon%3C%2FTD%3E%3CTD%20width%3D%2279px%22%3EA%3C%2FTD%3E%3CTD%20width%3D%22102px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22123px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22135px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22123px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22101px%22%3E%26nbsp%3B%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%20width%3D%22135px%22%3EDay%201%3C%2FTD%3E%3CTD%20width%3D%2279px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22102px%22%3E72%3C%2FTD%3E%3CTD%20width%3D%22123px%22%3E10%3C%2FTD%3E%3CTD%20width%3D%22135px%22%3E43%3C%2FTD%3E%3CTD%20width%3D%22123px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22101px%22%3E75%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%20width%3D%22135px%22%3EDay%202%3C%2FTD%3E%3CTD%20width%3D%2279px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22102px%22%3E81%3C%2FTD%3E%3CTD%20width%3D%22123px%22%3E8%3C%2FTD%3E%3CTD%20width%3D%22135px%22%3E45%3C%2FTD%3E%3CTD%20width%3D%22123px%22%3E7%3C%2FTD%3E%3CTD%20width%3D%22101px%22%3E75%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%20width%3D%22135px%22%3ERobert%3C%2FTD%3E%3CTD%20width%3D%2279px%22%3EB%3C%2FTD%3E%3CTD%20width%3D%22102px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22123px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22135px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22123px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22101px%22%3E%26nbsp%3B%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%20width%3D%22135px%22%3EDay%201%3C%2FTD%3E%3CTD%20width%3D%2279px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22102px%22%3E87%3C%2FTD%3E%3CTD%20width%3D%22123px%22%3E12%3C%2FTD%3E%3CTD%20width%3D%22135px%22%3E33%3C%2FTD%3E%3CTD%20width%3D%22123px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22101px%22%3E75%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%20width%3D%22135px%22%3EDay%202%3C%2FTD%3E%3CTD%20width%3D%2279px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22102px%22%3E78%3C%2FTD%3E%3CTD%20width%3D%22123px%22%3E12%3C%2FTD%3E%3CTD%20width%3D%22135px%22%3E33%3C%2FTD%3E%3CTD%20width%3D%22123px%22%3E9%3C%2FTD%3E%3CTD%20width%3D%22101px%22%3E74%3C%2FTD%3E%3C%2FTR%3E%3C%2FTBODY%3E%3C%2FTABLE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESpreadsheet%203(%20week%202)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CTABLE%20width%3D%22755%22%3E%3CTBODY%3E%3CTR%3E%3CTD%20width%3D%2264%22%3EEmployee%20Name%3C%2FTD%3E%3CTD%20width%3D%22111%22%3ESide%20A%20or%20B%3C%2FTD%3E%3CTD%20width%3D%22119%22%3EAvg%20Heart%20Rate%3C%2FTD%3E%3CTD%20width%3D%22119%22%3ETotal%20Movement%3C%2FTD%3E%3CTD%20width%3D%22129%22%3ETotal%20Boxes%20Moved%3C%2FTD%3E%3CTD%20width%3D%2299%22%3ETime%20of%20Sign%20Out%3C%2FTD%3E%3CTD%20width%3D%22114%22%3EIndoor%20Temp%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%3EAlison%3C%2FTD%3E%3CTD%3EA%3C%2FTD%3E%3CTD%3E%26nbsp%3B%3C%2FTD%3E%3CTD%3E%26nbsp%3B%3C%2FTD%3E%3CTD%3E%26nbsp%3B%3C%2FTD%3E%3CTD%3E%26nbsp%3B%3C%2FTD%3E%3CTD%3E%26nbsp%3B%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%20width%3D%2264%22%3EDay%201%3C%2FTD%3E%3CTD%3E%26nbsp%3B%3C%2FTD%3E%3CTD%3E76%3C%2FTD%3E%3CTD%3E6%3C%2FTD%3E%3CTD%3E33%3C%2FTD%3E%3CTD%3E%26nbsp%3B%3C%2FTD%3E%3CTD%3E75%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%20width%3D%2264%22%3EDay%202%3C%2FTD%3E%3CTD%3E%26nbsp%3B%3C%2FTD%3E%3CTD%3E69%3C%2FTD%3E%3CTD%3E9%3C%2FTD%3E%3CTD%3E28%3C%2FTD%3E%3CTD%3E2%3C%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E10%3C%2FTD%3E%3CTD%3E41%3C%2FTD%3E%3CTD%3E%26nbsp%3B%3C%2FTD%3E%3CTD%3E75%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%20width%3D%2264%22%3EDay%202%3C%2FTD%3E%3CTD%3E%26nbsp%3B%3C%2FTD%3E%3CTD%3E81%3C%2FTD%3E%3CTD%3E10%3C%2FTD%3E%3CTD%3E39%3C%2FTD%3E%3CTD%3E7%3C%2FTD%3E%3CTD%3E76%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%3EShannon%3C%2FTD%3E%3CTD%3EB%3C%2FTD%3E%3CTD%3E%26nbsp%3B%3C%2FTD%3E%3CTD%3E%26nbsp%3B%3C%2FTD%3E%3CTD%3E%26nbsp%3B%3C%2FTD%3E%3CTD%3E%26nbsp%3B%3C%2FTD%3E%3CTD%3E%26nbsp%3B%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%20width%3D%2264%22%3EDay%201%3C%2FTD%3E%3CTD%3E%26nbsp%3B%3C%2FTD%3E%3CTD%3E87%3C%2FTD%3E%3CTD%3E9%3C%2FTD%3E%3CTD%3E39%3C%2FTD%3E%3CTD%3E%26nbsp%3B%3C%2FTD%3E%3CTD%3E76%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%20width%3D%2264%22%3EDay%202%3C%2FTD%3E%3CTD%3E%26nbsp%3B%3C%2FTD%3E%3CTD%3E78%3C%2FTD%3E%3CTD%3E12%3C%2FTD%3E%3CTD%3E38%3C%2FTD%3E%3CTD%3E9%3C%2FTD%3E%3CTD%3E74%3C%2FTD%3E%3C%2FTR%3E%3C%2FTBODY%3E%3C%2FTABLE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECan%20you%20guys%20help%20me%20write%20this%20function%3F%20I've%20been%20having%20a%20really%20hard%20time%20following%20the%20rules.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAlso%2C%20I%20understand%20I%20can%20send%20back%20a%20value%20instead%20of%20a%20string%2C%20but%20I%20may%20want%20to%20manually%20omit%20a%20week%20or%20slightly%20change%20the%20conditions%20for%20another%20week.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2741975%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMacros%20and%20VBA%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
New Contributor

Hey Everyone,

 

I'm having a really hard time writing a function in excel, not because of the logic, but rather the language. 

 

I'm trying to create a function that will return back string.

I'd really like a function that does this

 

Function Create_Count_IF(Employee_Name_Range, Employee_Name, Measurement 1, Name_Range 2, Measurement 2.........Name_Range N, Name_Range Measurement N)

 

 

So in the example, I want to tally the total amount of weeks "Robert" was

 

-Working on side A

-Working in conditions equal to or hotter than 75

 

//Grab Roberts Row Positioning  

Week 1    Week 2  Week 3   Week 4........... Week N

6              5  

 

 

Create_Count_IF(Track!A2:A7, ="Robert", Week_1!B2:B19,="A",Week_1!G2:919,>=75)

 

returns string

 

CountIF( Week_1!B18:B19,="A",Week_1!G18:19,>=75) +CountIF( Week_2!B16:B17,="A",Week_2!G16:17,>=75)

 

 

 

 

 

There is currently 3 sheets in my example

 

Sheet 1 (Track)

-This just tells you which employee shows up in order from top to bottom in each week's spreadsheet. 

Employee NameWeek 1Week 2Week 3Week 4
Mary22  
Devin13  
Shannon56  
Robert65  
Alison31  
Corey44  

Sheet 2 ( Week 1)

-

Employee NameSide A or BAvg Heart RateTotal MovementTotal Boxes MovedTime of Sign OutIndoor Temp
DevinA     
Day 1 761032 75
Day 2 76729275
MaryA     
Day 1 751237 76
Day 2 881335476
AlisonB     
Day 1 771037 76
Day 2 881135676
CoreyB     
Day 1 691245 76
Day 2 73925776
ShannonA     
Day 1 721043 75
Day 2 81845775
RobertB     
Day 1 871233 75
Day 2 781233974

 

 

Spreadsheet 3( week 2)

 

Employee NameSide A or BAvg Heart RateTotal MovementTotal Boxes MovedTime of Sign OutIndoor Temp
AlisonA     
Day 1 76633 75
Day 2 69928275
MaryA     
Day 1 811134 76
Day 2 75437476
DevinB     
Day 1 78938 76
Day 2 901434678
CoreyB     
Day 1 771142 78
Day 2 761347776
RobertA     
Day 1 791041 75
Day 2 811039776
ShannonB     
Day 1 87939 76
Day 2 781238974

 

Can you guys help me write this function? I've been having a really hard time following the rules. 

 

Also, I understand I can send back a value instead of a string, but I may want to manually omit a week or slightly change the conditions for another week. 

1 Reply

@JeremyIsADeadHead 

=SUMPRODUCT(COUNTIFS(INDIRECT("week"&ROW($1:$3)&"!H3:H21"),">=75",INDIRECT("week"&ROW($1:$3)&"!A2:A20"),A2,INDIRECT("week"&ROW($1:$3)&"!B2:B20"),"B"))

 

I suggest to apply above formula to count the number of weeks when Robert worked at side B and when temperature was >=75. Enter formula in F2 of sheet "task" and copy down.

 

In order to check the temperature criteria i added an additional column (H in this example, please see attached file) and entered a MAX formula to calculate the highest temperature during the week (in your example Day 1 and Day 2).

 

Above formula works for 3 sheets already. The reference of the indirect function ("week"&ROW($1:$3)&"!H3:H21") refers to ranges:    {"week1!H3:H21";"week2!H3:H21";"week3!H3:H21"}

 

This means that formula can easily be adapted to calculate through many more sheets, e.g. by entering:   "week"&ROW($1:$100)&"!H3:H21"    and the equivalents in the search ranges of above formula.

 

Of course there are ways to carry out calculation for week1 to 9 and week 12 and week15 in one go. However this would require some adjustments. It is as well possible to make the formula dynamic, e.g. if you want to replace A with B or 75 with 77 or if the number of employees changes.