SOLVED

Divide a quantity as whole number among multiple cells

%3CLINGO-SUB%20id%3D%22lingo-sub-154139%22%20slang%3D%22en-US%22%3EDivide%20a%20quantity%20as%20whole%20number%20among%20multiple%20cells%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-154139%22%20slang%3D%22en-US%22%3E%3CP%3EHello%2C%3C%2FP%3E%0A%3CP%3EAny%20suggestion%20for%20an%20excel%20formula%20to%20derive%20A2%2C%20B2%2C%20C2%2C%20D2%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Evalues.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EEg%3A%3C%2FP%3E%0A%3CTABLE%20style%3D%22border-collapse%3A%20collapse%3B%20width%3A%20288pt%3B%22%20border%3D%220%22%20width%3D%22384%22%20cellspacing%3D%220%22%20cellpadding%3D%220%22%3E%0A%3CTBODY%3E%0A%3CTR%20style%3D%22height%3A%2013.0pt%3B%22%3E%0A%3CTD%20width%3D%2264%22%20height%3D%2217%22%20class%3D%22xl64%22%20style%3D%22height%3A%2013.0pt%3B%20width%3A%2048pt%3B%22%3ECategory%3C%2FTD%3E%0A%3CTD%20width%3D%2264%22%20class%3D%22xl64%22%20style%3D%22border-left%3A%20none%3B%20width%3A%2048pt%3B%22%3EIncome%3C%2FTD%3E%0A%3CTD%20width%3D%2264%22%20class%3D%22xl64%22%20style%3D%22border-left%3A%20none%3B%20width%3A%2048pt%3B%22%3EA%3C%2FTD%3E%0A%3CTD%20width%3D%2264%22%20class%3D%22xl64%22%20style%3D%22border-left%3A%20none%3B%20width%3A%2048pt%3B%22%3EB%3C%2FTD%3E%0A%3CTD%20width%3D%2264%22%20class%3D%22xl64%22%20style%3D%22border-left%3A%20none%3B%20width%3A%2048pt%3B%22%3EC%3C%2FTD%3E%0A%3CTD%20width%3D%2264%22%20class%3D%22xl64%22%20style%3D%22border-left%3A%20none%3B%20width%3A%2048pt%3B%22%3ED%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%20style%3D%22height%3A%2012.5pt%3B%22%3E%0A%3CTD%20height%3D%2217%22%20class%3D%22xl63%22%20style%3D%22height%3A%2012.5pt%3B%20border-top%3A%20none%3B%22%3ESal1%3C%2FTD%3E%0A%3CTD%20align%3D%22right%22%20class%3D%22xl63%22%20style%3D%22border-top%3A%20none%3B%20border-left%3A%20none%3B%22%3E11%3C%2FTD%3E%0A%3CTD%20align%3D%22right%22%20class%3D%22xl63%22%20style%3D%22border-top%3A%20none%3B%20border-left%3A%20none%3B%22%3E3%3C%2FTD%3E%0A%3CTD%20align%3D%22right%22%20class%3D%22xl63%22%20style%3D%22border-top%3A%20none%3B%20border-left%3A%20none%3B%22%3E3%3C%2FTD%3E%0A%3CTD%20align%3D%22right%22%20class%3D%22xl63%22%20style%3D%22border-top%3A%20none%3B%20border-left%3A%20none%3B%22%3E3%3C%2FTD%3E%0A%3CTD%20align%3D%22right%22%20class%3D%22xl63%22%20style%3D%22border-top%3A%20none%3B%20border-left%3A%20none%3B%22%3E2%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3C%2FTBODY%3E%0A%3C%2FTABLE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3Eif%20we%20divide%2011%20among%204%20columns%2C%202.75%20will%20result%20in%20the%204%20cells%3C%2FP%3E%0A%3CP%3EBut%20I%20need%20the%20excel%20formula%20to%20get%20the%20whole%20number%2C%20next%20integer(3%20for%202.75)%20in%20all%20cells.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAny%20response%20will%20be%20helpful.%20Thanks%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-154139%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-283867%22%20slang%3D%22en-US%22%3ERe%3A%20Divide%20a%20quantity%20as%20whole%20number%20among%20multiple%20cells%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-283867%22%20slang%3D%22en-US%22%3E%3CP%3EReference%20%3A%20%3CA%20href%3D%22https%3A%2F%2Fsupport.office.com%2Fen-us%2Farticle%2Fisformula-function-e4d1355f-7121-4ef2-801e-3839bfd6b1e5%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3EIsFormula%20Function%3C%2FA%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-283854%22%20slang%3D%22en-US%22%3ERe%3A%20Divide%20a%20quantity%20as%20whole%20number%20among%20multiple%20cells%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-283854%22%20slang%3D%22en-US%22%3E%3CP%3EI%20have%202016%2C%20I%20don't%20know%20what%20isFormula%26nbsp%3Bfunction%20is.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-283828%22%20slang%3D%22en-US%22%3ERe%3A%20Divide%20a%20quantity%20as%20whole%20number%20among%20multiple%20cells%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-283828%22%20slang%3D%22en-US%22%3EMay%20I%20have%20your%20excel%20version%3F%20Does%20it%20have%20IsFormula%20Function%3F%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-279520%22%20slang%3D%22en-US%22%3ERe%3A%20Divide%20a%20quantity%20as%20whole%20number%20among%20multiple%20cells%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-279520%22%20slang%3D%22en-US%22%3E%3CP%3EThanks%20for%20trying%2C%20I%20couldn't%20get%20that%20formula%20to%20work%20at%20all.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CLI-EMOJI%20id%3D%22lia_disappointed-face%22%20title%3D%22%3Adisappointed_face%3A%22%3E%3C%2FLI-EMOJI%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-278017%22%20slang%3D%22en-US%22%3ERe%3A%20Divide%20a%20quantity%20as%20whole%20number%20among%20multiple%20cells%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-278017%22%20slang%3D%22en-US%22%3E%3CP%3EI%20am%20so%20sorry%20for%20the%20late%20reply.%26nbsp%3B%20I%20am%20not%20sure%20if%20the%20following%20approach%20suits%20your%20needs.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20Formula%20is%3C%2FP%3E%3CPRE%3E%3D%24A%241%2FSUMPRODUCT(--(ISFORMULA(%24B%241%3A%24F%241)))%3C%2FPRE%3E%3CP%3E%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3CTABLE%3E%3CTBODY%3E%3CTR%3E%3CTD%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FTD%3E%3CTD%3EA%3C%2FTD%3E%3CTD%3EB%3C%2FTD%3E%3CTD%3EC%3C%2FTD%3E%3CTD%3ED%3C%2FTD%3E%3CTD%3EE%3C%2FTD%3E%3CTD%3EF%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%3E1%3C%2FTD%3E%3CTD%3E50%3C%2FTD%3E%3CTD%3E%3CPRE%3E%3DTheFormula%3C%2FPRE%3E%3C%2FTD%3E%3CTD%3E%3CPRE%3E%3DTheFormula%3C%2FPRE%3E%3C%2FTD%3E%3CTD%3E%3CPRE%3E%3DTheFormula%3C%2FPRE%3E%3C%2FTD%3E%3CTD%3E%3CPRE%3E%3DTheFormula%3C%2FPRE%3E%3C%2FTD%3E%3CTD%3E%3CPRE%3E%3DTheFormula%3C%2FPRE%3E%3C%2FTD%3E%3C%2FTR%3E%3C%2FTBODY%3E%3C%2FTABLE%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-259971%22%20slang%3D%22en-US%22%3ERe%3A%20Divide%20a%20quantity%20as%20whole%20number%20among%20multiple%20cells%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-259971%22%20slang%3D%22en-US%22%3E%3CP%3EI%20need%20a%20similar%20thing%20with%20a%20couple%20of%20differences.%20I%20need%20to%20do%20the%20same%20derive%20values%20across%20variable%20columns%20from%20a%20number%20entered%20into%20the%20first%20column%2C%20but%20i%20also%20need%20to%20be%20able%20to%20manually%20override%20the%20formula%20in%20some%20cells%20but%20have%20the%20other%20cells%20adjust%20to%20the%20variable.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EExample%3A%20A1%3D50%2C%20B1%3AF1%20%3D%2010%2C%20but%20if%20I%20manually%20adjust%20C1%20to%20equal%200%2C%20the%20other%204%20cells%20should%20auto-adjust%20to%2012.5%3C%2FP%3E%3CP%3EThe%20formula%20should%20be%20variable%20to%20be%20copied%20across%202%20cells%20or%2020.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThoughts%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAllain%3C%2FP%3E%3CP%3Eallainm%40gmail.com%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-259968%22%20slang%3D%22en-US%22%3ERe%3A%20Divide%20a%20quantity%20as%20whole%20number%20among%20multiple%20cells%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-259968%22%20slang%3D%22en-US%22%3E%3CP%3EI%20need%20a%20similar%20thing%20with%20a%20couple%20of%20differences.%20I%20need%20to%20do%20the%20same%20derive%20values%20across%20variable%20columns%20from%20a%20number%20entered%20into%20the%20first%20column%2C%20but%20i%20also%20need%20to%20be%20able%20to%20manually%20override%20the%20formula%20in%20some%20cells%20but%20have%20the%20other%20cells%20adjust%20to%20the%20variable.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EExample%3A%20A1%3D50%2C%20B1%3AF1%20%3D%2010%2C%20but%20if%20I%20manually%20adjust%20C1%20to%20equal%200%2C%20the%20other%204%20cells%20should%20auto-adjust%20to%2012.5%3C%2FP%3E%3CP%3EThe%20formula%20should%20be%20variable%20to%20be%20copied%20across%202%20cells%20or%2020.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThoughts%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAllain%3C%2FP%3E%3CP%3Eallainm%40gmail.com%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-155443%22%20slang%3D%22en-US%22%3ERe%3A%20Divide%20a%20quantity%20as%20whole%20number%20among%20multiple%20cells%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-155443%22%20slang%3D%22en-US%22%3E%3CP%3Ehmm..Thank%20you%26nbsp%3B%20Willy%20for%20the%20support%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3Eits%20solved%20my%20issue%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThank%20you!%3C%2FP%3E%0A%3CP%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-154554%22%20slang%3D%22en-US%22%3ERe%3A%20Divide%20a%20quantity%20as%20whole%20number%20among%20multiple%20cells%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-154554%22%20slang%3D%22en-US%22%3E%3CP%3EIt%20is%20because%20your%20sheet%20keeps%20my%20previous%20version%20formula.%26nbsp%3B%20You%20may%20clear%20C2%2C%20D2%2C%20E2%20and%20F2.%26nbsp%3B%20Then%2C%20paste%20the%20latest%20formula%20to%20C2.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-154410%22%20slang%3D%22en-US%22%3ERe%3A%20Divide%20a%20quantity%20as%20whole%20number%20among%20multiple%20cells%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-154410%22%20slang%3D%22en-US%22%3E%3CP%3EThank%20you%20for%20the%20response%2C%20I%20am%20unable%20to%20get%20the%20expected%20results%3C%2FP%3E%0A%3CP%3EWhen%20I%20am%20pasting%20the%20formula%20in%20C2%2C%20it%20results%20in%20circulate%20reference%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-154365%22%20slang%3D%22en-US%22%3ERe%3A%20Divide%20a%20quantity%20as%20whole%20number%20among%20multiple%20cells%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-154365%22%20slang%3D%22en-US%22%3E%3CPRE%3E%3DMIN(IF(COLUMN()%3D3%2C%24B2%2C%24B2-SUM(%24C2%3AOFFSET(C2%2C0%2C-1)))%2C%20ROUNDUP(%24B2%2F(SUMPRODUCT(NOT(%241%3A%241%3D0)*1)-2)%2C0))%3C%2FPRE%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-154353%22%20slang%3D%22en-US%22%3ERe%3A%20Divide%20a%20quantity%20as%20whole%20number%20among%20multiple%20cells%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-154353%22%20slang%3D%22en-US%22%3E%3CP%3EHello%20Detlef%2C%3C%2FP%3E%0A%3CP%3ESorry%20I%20didn't%20explain%20it%20right!%3C%2FP%3E%0A%3CP%3EI%20look%20for%20auto%20population%20of%20values%20in%20C2%2CD2%2CE2%20and%20F2%20cells.%3C%2FP%3E%0A%3CP%3Eand%20if%20we%20the%20quantity%20to%20divide%20is%205%2C%3C%2FP%3E%0A%3CP%3EI%26nbsp%3B%20need%20to%20get%3C%2FP%3E%0A%3CP%3EC2%3D2%3C%2FP%3E%0A%3CP%3ED2%3D2%3C%2FP%3E%0A%3CP%3EE2%3D1%3C%2FP%3E%0A%3CP%3EF2%3D0(blank)%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-154352%22%20slang%3D%22en-US%22%3ERe%3A%20Divide%20a%20quantity%20as%20whole%20number%20among%20multiple%20cells%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-154352%22%20slang%3D%22en-US%22%3E%3CP%3EThank%20you%20Willy%20for%20the%20response%2C%20Sorry%20if%20I%20didn't%20articulate%20my%20problem%20clearly%3B%3C%2FP%3E%0A%3CP%3EThe%20cells%20in%20which%20I%20require%20values%20are%20C2%2CD2%2CE2%2CF2%3C%2FP%3E%0A%3CP%3Eits%20not%20required%20to%20have%20values%20in%20all%20cells%2C%20if%20we%20take%205%20as%20example%3A%3C%2FP%3E%0A%3CP%3EC2%20has%20to%20take%202%3C%2FP%3E%0A%3CP%3ED2%20has%20to%20take%202%3C%2FP%3E%0A%3CP%3EE2%20has%20to%20take%201%3C%2FP%3E%0A%3CP%3ED2%20can%20be%20blank%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-154164%22%20slang%3D%22en-US%22%3ERe%3A%20Divide%20a%20quantity%20as%20whole%20number%20among%20multiple%20cells%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-154164%22%20slang%3D%22en-US%22%3E%3CP%3ERemya%2C%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3Eyour%20cell%20references%20(A2%2C%20B2%2C%20...)%20can't%20be%20correct.%3C%2FP%3E%0A%3CP%3EI%20assume%20%22Category%22%20is%20in%20A1%20and%20%222%22%20is%20in%20F2.%3C%2FP%3E%0A%3CPRE%3E%3DIF(COLUMN()%3D6%2C%24B2-SUM(%24C2%3A%24E2)%2CROUNDUP(%24B2%2F4%2C0))%0A%3C%2FPRE%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-154156%22%20slang%3D%22en-US%22%3ERe%3A%20Divide%20a%20quantity%20as%20whole%20number%20among%20multiple%20cells%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-154156%22%20slang%3D%22en-US%22%3E%3CP%3EThis%20is%20what%20I%20guess%20you%20want%3C%2FP%3E%0A%3CPRE%3E%3DROUNDUP(IF(B2%3D%24B2%2C%24B2%2C%24B2-SUM(%24C2%3AOFFSET(C2%2C0%2C-1)))%2F(SUMPRODUCT(NOT(%241%3A%241%3D0)*1)-COLUMN(B2))%2C0)%3C%2FPRE%3E%0A%3CP%3EAssume%20that%20you%20enter%20the%20formula%20at%20C2%2C%20and%20copy%20%26amp%3B%20paste%20the%20formula%20to%20the%20cells%20you%20need%20it.%26nbsp%3B%20If%20later%20on%2C%20you%20want%20E%2C%20F%2C%20G%20etc.%2C%20you%20just%20need%20to%20add%20the%20headers%20and%20paste%20the%20formula.%3C%2FP%3E%0A%3CP%3EEg%3A%3C%2FP%3E%0A%3CTABLE%20border%3D%220%22%20width%3D%22384%22%20cellspacing%3D%220%22%20cellpadding%3D%220%22%3E%0A%3CTBODY%3E%0A%3CTR%3E%0A%3CTD%20width%3D%2264%22%20height%3D%2217%22%20class%3D%22xl64%22%3ECategory%3C%2FTD%3E%0A%3CTD%20width%3D%2264%22%20class%3D%22xl64%22%3EIncome%3C%2FTD%3E%0A%3CTD%20width%3D%2264%22%20class%3D%22xl64%22%3EA%3C%2FTD%3E%0A%3CTD%20width%3D%2264%22%20class%3D%22xl64%22%3EB%3C%2FTD%3E%0A%3CTD%20width%3D%2264%22%20class%3D%22xl64%22%3EC%3C%2FTD%3E%0A%3CTD%20width%3D%2264%22%20class%3D%22xl64%22%3ED%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20height%3D%2217%22%20class%3D%22xl63%22%3Esomething%3C%2FTD%3E%0A%3CTD%20align%3D%22right%22%20class%3D%22xl63%22%3E6%3C%2FTD%3E%0A%3CTD%20align%3D%22right%22%20class%3D%22xl63%22%3E2%3C%2FTD%3E%0A%3CTD%20align%3D%22right%22%20class%3D%22xl63%22%3E2%3C%2FTD%3E%0A%3CTD%20align%3D%22right%22%20class%3D%22xl63%22%3E1%3C%2FTD%3E%0A%3CTD%20align%3D%22right%22%20class%3D%22xl63%22%3E1%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20height%3D%2217%22%20class%3D%22xl63%22%3Eanother%20thing%3C%2FTD%3E%0A%3CTD%20align%3D%22right%22%20class%3D%22xl63%22%3E5%3C%2FTD%3E%0A%3CTD%20align%3D%22right%22%20class%3D%22xl63%22%3E2%3C%2FTD%3E%0A%3CTD%20align%3D%22right%22%20class%3D%22xl63%22%3E1%3C%2FTD%3E%0A%3CTD%20align%3D%22right%22%20class%3D%22xl63%22%3E1%3C%2FTD%3E%0A%3CTD%20align%3D%22right%22%20class%3D%22xl63%22%3E1%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3C%2FTBODY%3E%0A%3C%2FTABLE%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-935763%22%20slang%3D%22en-US%22%3ERe%3A%20Divide%20a%20quantity%20as%20whole%20number%20among%20multiple%20cells%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-935763%22%20slang%3D%22en-US%22%3EWilly%2C%3CBR%20%2F%3EIt%E2%80%99s%20a%20while%20since%20you%20posted%20this%20solution%20-%20I%E2%80%99ve%20successfully%20used%20your%20formula%2C%20but%20would%20there%20be%20a%20way%20of%20adjusting%20it%20to%20set%20a%20maximum%20permissible%20value%3F%20I.e.%20in%20your%20example%20A%2C%20B%2C%20C%20etc%20could%20be%20no%20greater%20than%208.%3CBR%20%2F%3E%3CBR%20%2F%3ECheers%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1016376%22%20slang%3D%22en-US%22%3ERe%3A%20Divide%20a%20quantity%20as%20whole%20number%20among%20multiple%20cells%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1016376%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F97717%22%20target%3D%22_blank%22%3E%40Willy%20Lau%3C%2FA%3E%26nbsp%3BHi%20Willy%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20a%20lot%20for%20addressing%20this%20issue.%3C%2FP%3E%3CP%3EI%20have%20a%20similar%20requirement.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20need%20to%20distribute%20quantities%20in%201%20cell%20among%2012%20columns%20(all%20months%20of%202020%20for%20a%20forecast)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20tried%20applying%20your%20formula%2C%20but%20I%20just%20got%20the%20same%20number%20as%20in%20the%20original%20cell%20in%20the%20cell%20containing%20the%20formula%20but%20fails%20to%20distribute%20it%20among%20the%20rest%2011%20columns.%20Please%20help%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1163955%22%20slang%3D%22en-US%22%3ERe%3A%20Divide%20a%20quantity%20as%20whole%20number%20among%20multiple%20cells%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1163955%22%20slang%3D%22en-US%22%3E%3CPRE%3E(%241%3A%241%3D0)%3C%2FPRE%3E%3CP%3Ei%20didnt't%20understand%20this%20thing%20could%20you%20please%20explain%20it.%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F97717%22%20target%3D%22_blank%22%3E%40Willy%20Lau%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2031752%22%20slang%3D%22en-US%22%3ERe%3A%20Divide%20a%20quantity%20as%20whole%20number%20among%20multiple%20cells%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2031752%22%20slang%3D%22en-US%22%3E%3CP%3EI've%20been%20looking%20all%20over%20the%20internet%20trying%20to%20find%20a%20solution%20to%20my%20problem%20and%20this%20post%20seems%20to%20be%20on%20the%20right%20track%20but%20does%20not%20quite%20get%20to%20the%20necessary%20answer%20I%20am%20looking%20for.%3C%2FP%3E%3CP%3EI%20need%20to%20divide%20a%20whole%20number%20into%205%20columns%20with%20a%20maximum%20of%203%20in%20each%20column%20apart%20from%20column%205%20which%20can%20be%20the%20remaining%20number%20of%20whole%20numbers%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EExample%3A%20The%20whole%20number%20is%2020%3C%2FP%3E%3CP%3EColumn%20A%203%3C%2FP%3E%3CP%3EColumn%20B%203%3C%2FP%3E%3CP%3EColumn%20C%203%3C%2FP%3E%3CP%3EColumn%20D%203%3C%2FP%3E%3CP%3EColumn%20E%208%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIs%20there%20a%20formula%20that%20can%20help%20me%20achieve%20this%3F%3C%2FP%3E%3CP%3EI%20would%20be%20sincerely%20grateful%20for%20any%20assistance.%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F114181%22%20target%3D%22_blank%22%3E%40Remya%20Ramakrishnan%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2031863%22%20slang%3D%22en-US%22%3ERe%3A%20Divide%20a%20quantity%20as%20whole%20number%20among%20multiple%20cells%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2031863%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F918009%22%20target%3D%22_blank%22%3E%40Kazz84%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIf%20your%20target%20number%20(20)%20is%20in%20cell%20A1%2C%20then%20try%20this%20in%20cell%20A2%20and%20copy%20to%20cell%20E2%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-applescript%22%3E%3CCODE%3E%3D(COLUMNS(%24A2%3AA2)%26lt%3B5)*MEDIAN(0%2C3%2C%24A%241-(COLUMNS(%24A2%3AA2)-1)*3)%2B(COLUMNS(%24A2%3AA2)%3D5)*MAX(0%2C%24A%241-12)%3C%2FCODE%3E%3C%2FPRE%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%22JMB17_0-1609831107629.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F244217i6D9DBD70BCD3C2BC%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22JMB17_0-1609831107629.png%22%20alt%3D%22JMB17_0-1609831107629.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-2031870%22%20slang%3D%22en-US%22%3ERe%3A%20Divide%20a%20quantity%20as%20whole%20number%20among%20multiple%20cells%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2031870%22%20slang%3D%22en-US%22%3E%3CP%3EThis%20works%20brilliantly%2C%20you%20are%20such%20a%20legend.%20You%20have%20changed%20my%20life%20in%20one%20formula.%20Thank%20you!%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F675152%22%20target%3D%22_blank%22%3E%40JMB17%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2031901%22%20slang%3D%22en-US%22%3ERe%3A%20Divide%20a%20quantity%20as%20whole%20number%20among%20multiple%20cells%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2031901%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F918009%22%20target%3D%22_blank%22%3E%40Kazz84%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIf%20with%20dynamic%20arrays%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%20343px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F244231i8D25D933C39C435A%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%0A%3CP%3Ethat%20could%20be%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-excel%22%3E%3CCODE%3E%3DLET(n%2C5%2Ck%2CSEQUENCE(%2Cn)%2C%20maxv%2C3%2C%20v%2C%20MIN(ROUND(A1%2Fn%2C0)%2Cmaxv)%2C%20rest%2C%20A1-v*(n-1)%2C%20IF(k%3CN%3E%3C%2FN%3E%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3Ebut%20perhaps%20we%20understood%20the%20requirement%20differently%3A%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%20332px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F244232i92F599AC81990439%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-2034822%22%20slang%3D%22en-US%22%3ERe%3A%20Divide%20a%20quantity%20as%20whole%20number%20among%20multiple%20cells%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2034822%22%20slang%3D%22en-US%22%3EYou%20are%20welcome.%20I%20appreciate%20the%20kind%20words%2C%20but%20much%20of%20what%20I%20know%20came%20from%20people%20who%20are%20much%20better%20at%20this%20than%20me%20-%20I'm%20just%20the%20middleman.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2071700%22%20slang%3D%22en-US%22%3ERe%3A%20Divide%20a%20quantity%20as%20whole%20number%20among%20multiple%20cells%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2071700%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F97717%22%20target%3D%22_blank%22%3E%40Willy%20Lau%3C%2FA%3E%26nbsp%3BHi%20Willy%2C%20how%20do%20you%20adjust%20this%20formula%20to%20split%20the%20total%20values%20into%20%22pieces%22%20of%208%20instead%20of%202%20in%20the%20example%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2081650%22%20slang%3D%22en-US%22%3ERe%3A%20Divide%20a%20quantity%20as%20whole%20number%20among%20multiple%20cells%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2081650%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%3BI%20tried%20the%20let%20formula%20but%20i%20dont%20seem%20to%20be%20able%20to%20use%20it.%20My%20requirement%20is%20like%20that%20but%20I%20ant%20to%20split%20the%20numbers%20to%20pieces%20of%208.%20(because%20for%20me%2C%20i%20need%20to%20split%20total%20manhours%20to%208%20man%20hours%20%2F%20day%2Fcolumn)%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2082403%22%20slang%3D%22en-US%22%3ERe%3A%20Divide%20a%20quantity%20as%20whole%20number%20among%20multiple%20cells%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2082403%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F933528%22%20target%3D%22_blank%22%3E%40JCOKER545%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EDo%20you%20mean%20something%20like%20this%3F%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%20404px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F248045iC868C6E93F89DDA6%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%0A%3CPRE%20class%3D%22lia-code-sample%20language-excel%22%3E%3CCODE%3E%3DLET(n%2C5%2Ck%2CSEQUENCE(%2Cn)%2C%20hrs%2C8%2C%20v%2C%20A1-hrs*(k-1)%2C%20rest%2C%20v*(v%26gt%3B0)%2C%20IF(k%3CN%3Ehrs%2Chrs%2Crest)%2Crest))%3C%2FN%3E%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FLINGO-BODY%3E
Occasional Contributor

Hello,

Any suggestion for an excel formula to derive A2, B2, C2, D2 values.

 

Eg:

Category Income A B C D
Sal1 11 3 3 3 2

 

if we divide 11 among 4 columns, 2.75 will result in the 4 cells

But I need the excel formula to get the whole number, next integer(3 for 2.75) in all cells.

 

Any response will be helpful. Thanks

61 Replies

@Kazz84 

 

If your target number (20) is in cell A1, then try this in cell A2 and copy to cell E2:

 

=(COLUMNS($A2:A2)<5)*MEDIAN(0,3,$A$1-(COLUMNS($A2:A2)-1)*3)+(COLUMNS($A2:A2)=5)*MAX(0,$A$1-12)

 

JMB17_0-1609831107629.png

 

This works brilliantly, you are such a legend. You have changed my life in one formula. Thank you! @JMB17 

@Kazz84 

If with dynamic arrays

image.png

that could be

=LET(n,5,k,SEQUENCE(,n), maxv,3, v, MIN(ROUND(A1/n,0),maxv), rest, A1-v*(n-1), IF(k<n,v,rest))

but perhaps we understood the requirement differently:

image.png

You are welcome. I appreciate the kind words, but much of what I know came from people who are much better at this than me - I'm just the middleman.

@Willy Lau Hi Willy, how do you adjust this formula to split the total values into "pieces" of 8 instead of 2 in the example

@Sergei Baklan I tried the let formula but i dont seem to be able to use it. My requirement is like that but I ant to split the numbers to pieces of 8. (because for me, i need to split total manhours to 8 man hours / day/column)

@JCOKER545 

Do you mean something like this?

image.png

=LET(n,5,k,SEQUENCE(,n), hrs,8, v, A1-hrs*(k-1), rest, v*(v>0), IF(k<n,IF(rest>hrs,hrs,rest),rest))

@Sergei Baklan @Willy Lau @JMB17 I have a similar issue I am trying to solve that goes alongside the original question. 

 

I work for a lighting company, and sometimes we get requests for extremely long runs that need to be cut into multiple cuts (the number of which will differ based on how long the requested length is).

 

I have already come up with other formulas to automatically calculate the total number of cuts (which will vary) that are needed based on the request (the variable in this case), but I would like for it to automatically calculate the length of EACH individual cut automatically (which will take multiple cells, the amount of which will vary).

 

So for instance, lets say the total length is 333, and the number of cuts ends up being 6. Since 333/6=55.5, I need excel to list out -- | 56 | 56 | 56 | 55 | 55 | 55 | -- automatically. Listing them vertically will actually look better though. However, if the requested total length is 127, and the number of cuts ends up as 2, then it should say -- | 64 | 63 | -- and the rest of the column blank. So there are two variables that the formula needs to reference in other cells on the sheet (total length, and the total number of cuts), and the results must be in whole numbers.

 

I hope that's a clear description of my problem. Is there any way to accomplish this feat? It will be an incredible help to our department to have this automatically (and accurately) done for us in. Thanks in advance for any and all help.

@CMStewart21 

 

I'll give it a try - see attached. I included some detail to give you an idea of how I'm approaching the problem (a table that shows up to 100 cuts). You don't need to keep this table, but I thought I would include it.

 

Also, there are several places where I'm using Row(Indirect(...)), which could be shortened if you have the sequence and/or let functions. I included what I think the formula would be in that case (untested as I don't have those functions on this machine).

@JMB17 thanks so much for that. I really like how you made it simply show the two lengths, with the quantities of each instead of a long list of lengths. That looks a lot more clean than I envisioned.

 

Since I don't fully understand how to utilize sequences and arrays, do you think it would just be best to use the formula you created on its own worksheet, and then on the main worksheet I made, have it reference the cells with the results? I was seeing if I could adjust the formula to reference other cells on my other excel file, but never got it to work (basically because I don't have an in-depth knowledge of these types of formulas). Even though you listed a lot of info to help me, I still have gaps in my knowledge.

I'm sure either would work - put it on a separate worksheet and just link the total length and cuts or cut/paste it to your main worksheet. I should have noted that the formula in C5 would need to be confirmed with Ctrl+Shift+Enter instead of just enter after editing if you're not using office 365.

If you want to modify the formulas in B5:D10 to pick up the total lengths/cuts from wherever they are calculated, I can take a look at it if you're able to upload a copy of the workbook (as long as there's no sensitive information, or maybe just enough to get the cell references for those values and I can modify the formula).

@JMB17 Alright! I may take you up on that. But it may be a little while. I have a spreadsheet I've started, but I may need to refine it before I know where everything will be (permanently). It's kind of a semi-rough draft, and I may move things around if I decide to add or remove options. I wouldn't want you to put a lot of work in to my spreadsheet now, and then end up having to redo it. Thanks so much for your help by the way.

@JMB17 So I have put in some work to try and structure my spreadsheet, based on the help you and some others have given me. However, I forgot about one aspect that needs to be included in this -- which may or may not be possible?

 

If you can, take a look at the spreadsheet I've been working on. It's still rough and things will end up being moved around, but it gives you an idea of where I'm going. I also gave you notes highlighted in RED on each sheet, so you understand what each sheet is for.

 

So the issue I have is I realized that, even if we cut the entire run into the proper lengths, there is still end caps on both sides of EACH RUN - equaling about an extra 1/8" per run. So I need, somehow, to have a calculator that will calculate the lengths of each run that will be split up, but to include -- in each run -- an addition length (such as 0.125") for the end-cap or lead-wire. I would like for that to NOT be set directly in the formula, but for it to be a variable, because depending on the product, it may need a different type of lead wire which is a different length than 1/8". (I hope I'm making some sense... if not, please let me know and I will try to explain it better).

 

So if you are willing to give this a shot or point me in the right direction, that would be amazing. The last bit of this, if I can solve this issue, will be to add a drop-down list on the main page to choose between our different products -- which, when selected, will change the max run length, cut increment, and lead-wire/end-cap space needed per run. Those are really the main 3 variables in all of this.

 

Let me know if I'm asking too much, or if I'm confusing you. You've helped a ton so far. I appreciate anything you can offer me from this point.

@Sergei Baklan @JMB17 

 

Good Morning,

 

I am trying to do a similar thing with this formula with a bit of a difference with how I require the result to be generated. For example I would like to divide a whole number across multiple cells but using a maximum value (maybe referencing another column as this number could change between each row) and the last cell to calculate the remaining number if its below the maximum. See below representation: 

 

*Note: is there a formula to leave a blank in remaining cells as opposed to zero?

UnitsCapacity Day 1 Day 2Day 3Day 4Day 5Day 6Day 7Day 8Day 9
102 22222    
103 3331     
104 442      
203 3333332  

 

@DianneTS 

Sorry, that's old thread and I don't remember what was before. Better to start from scratch. Could you please provide small sample file with manually added desired results and indicate on which Excel you are?

@DianneTS 

In D2:

 

=IF(MIN($B2,$A2-SUM($C2:C2))=0,"",MIN($B2,$A2-SUM($C2:C2)))

 

Fill down, then to the right (or vice versa)

@Hans Vogelaar 

 

Thank you so much for this. To add a spanner to the works, how would the formula need to change if I wanted to constrain the result between a start and finish date? For example, if the day columns were actual dates and I wanted the result to only be populated from a specified start date, see below:

 

UnitsCapacity Start Finish03/08/202104/08/202105/08/202106/08/202107/08/202108/08/202109/08/202110/08/202111/08/2021
102 03/08/202107/08/202122222    
103 03/08/202107/08/2021331      
104 05/08/202111/08/2021  442    
203 05/08/202111/08/2021  3333332

@DianneTS 

In F2:

 

=IF(OR(F$1<$D2,F$1>$E2),"",IF(F$1=$D2,MIN($A2,$B2),IF(MIN($B2,$A2-SUM(E2:$F2))=0,"",MIN($B2,$A2-SUM(E2:$F2)))))

Thank you for your expertise! Much appreciated.
I have a similar issue. I want to spread a base number over 7 cells to the right and the formula above works fine. My additional issue is that I want to repeat the process every 7 cells. Ex. 17 units to be rented each week. the above formula gives 3, 3, 3, 3, 3, 2, 0 (Mon - Sun) Then the following Mon it repeats using the same base of 17. Thanks in advance.