SOLVED

Formula help

%3CLINGO-SUB%20id%3D%22lingo-sub-1524582%22%20slang%3D%22en-US%22%3EFormula%20help%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1524582%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20trying%20to%20figure%20out%20a%20formula%20to%20not%20count%20certain%20values%20if%20there's%200%20in%20a%20cell%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EBasically%20if%20c3%26lt%3B0%20then%20don't%20add%20the%20values%20from%20D3-D5-D8-D9%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EMakes%20sense%3F%20help%3F%3F%3F%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1524582%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-1524631%22%20slang%3D%22de-DE%22%3ESubject%3A%20Formula%20help%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1524631%22%20slang%3D%22de-DE%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F729871%22%20target%3D%22_blank%22%3E%40titodona%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22tlid-translation%20translation%22%3E%3CSPAN%20class%3D%22%22%3EI%20am%20not%20sure%20if%20this%20is%20what%20you%20are%20looking%20for%20...%20if%20it%20is%20not%20please%20ignore%20it.%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22tlid-translation%20translation%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Summewenn.JPG%22%20style%3D%22width%3A%20256px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F205555iE2527D42A374B0A4%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22Summewenn.JPG%22%20alt%3D%22Total%20product%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3ETotal%20product%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22tlid-translation%20translation%22%3E%3CSPAN%20class%3D%22%22%3EFreehand%20copied%20from%20the%20internet%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22tlid-translation%20translation%22%3E%3CSPAN%20class%3D%22%22%3EIf%20it%20is%20the%20solution%20for%20you%20then%20I%20%3C%2FSPAN%3E%3C%2FSPAN%3Ewould%20be%20happy%20to%20find%20out%20if%20I%20could%20help%20with%20a%20%3CSPAN%20class%3D%22tlid-translation%20translation%22%3E%3CSPAN%20class%3D%22%22%3Ethumbs%20up%3C%2FSPAN%3E%3C%2FSPAN%3E%20%3CLI-EMOJI%20id%3D%22lia_slightly-smiling-face%22%20title%3D%22%3Aslightly_smiling_face%3A%22%3E%3C%2FLI-EMOJI%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ENikolino%3C%2FP%3E%3CP%3EI%20know%20I%20don't%20know%20anything%20(Socrates)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22tlid-translation%20translation%22%3E%3CSPAN%20class%3D%22%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1524743%22%20slang%3D%22en-US%22%3ERe%3A%20Formula%20help%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1524743%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F729871%22%20target%3D%22_blank%22%3E%40titodona%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CBLOCKQUOTE%3E%3CHR%20%2F%3E%3CP%3EI%20am%20trying%20to%20figure%20out%20a%20formula%20to%20not%20%3CSTRONG%3Ecount%20certain%20values%3C%2FSTRONG%3E%20if%20there's%200%20in%20a%20cell%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EBasically%20if%20c3%26lt%3B0%20then%20don't%20%3CSTRONG%3Eadd%20the%20values%3C%2FSTRONG%3E%20from%20D3-D5-D8-D9%26nbsp%3B%3C%2FP%3E%3CHR%20%2F%3E%3C%2FBLOCKQUOTE%3E%3CP%3EYou%20have%20said%20that%20you%20want%20to%20count%20values%20as%20well%20as%20don't%20add%20the%20values.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI'm%20not%20sure%20whether%20you%20want%20to%20count%20or%20sum%2C%20so%20here's%20both.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIn%20the%20following%20formulas%2C%20the%20length%20of%20the%20array%20of%201%2F0%20values%20is%20determined%20by%20the%20length%20of%20the%20data%20in%20column%20D%20(excluding%20the%20header)%20and%20the%20position%20of%20the%200s%20are%20determined%20by%20your%20request%20to%20exclude%20specifically%20D3%2C%20D5%2C%20D8%20and%20D9.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAs%20such%2C%20your%20exact%20implementation%20may%20differ.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESUM%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-excel%22%3E%3CCODE%3E%3DSUMPRODUCT(%24D%242%3A%24D%2414%2CN((%7B1%3B0%3B1%3B0%3B1%3B1%3B0%3B0%3B1%3B1%3B1%3B1%3B1%7D%2B(%24C%243%26gt%3B%3D0))%26gt%3B0))%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%3CBR%20%2F%3ECOUNT%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-excel%22%3E%3CCODE%3E%3DSUMPRODUCT(N((%7B1%3B0%3B1%3B0%3B1%3B1%3B0%3B0%3B1%3B1%3B1%3B1%3B1%7D%2B(%24C%243%26gt%3B%3D0))%26gt%3B0))%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%3CBR%20%2F%3EAs%20you%20can%20see%2C%20when%20C3%20is%20less%20than%200%2C%20the%20sum%20of%20my%20sample%20data%20is%20102%20and%20the%20count%20is%209.%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22OwenPrice_0-1594843696934.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F205585iCD377D55E172C84D%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20title%3D%22OwenPrice_0-1594843696934.png%22%20alt%3D%22OwenPrice_0-1594843696934.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWhen%20C3%20is%201%2C%20the%20sum%20is%20158%20and%20the%20count%20is%2013.%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22OwenPrice_1-1594843860416.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F205586i48F1D830F886D5D4%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20title%3D%22OwenPrice_1-1594843860416.png%22%20alt%3D%22OwenPrice_1-1594843860416.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EPlease%20include%20some%20sample%20data%20and%20scenarios%20with%20expected%20outcome%20in%20case%20this%20is%20not%20what%20you%20intended.%3CBR%20%2F%3E%3CBR%20%2F%3EPlease%20see%20attached%20and%20let%20me%20know%20if%20this%20helps.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1524806%22%20slang%3D%22en-US%22%3ERe%3A%20Formula%20help%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1524806%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F725726%22%20target%3D%22_blank%22%3E%40OwenPrice%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHi%2C%20I've%20added%20the%20sheet%20I'm%20working%20with%20if.%3C%2FP%3E%3CP%3EIn%20the%20%22add%20if%20a%20busser%2Frunner%20wasn't%20working%22%20that%20result%20should%20be%20if%20only%207%25%20was%20taken%20rather%20than%2014%25.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1525064%22%20slang%3D%22en-US%22%3ERe%3A%20Formula%20help%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1525064%22%20slang%3D%22en-US%22%3EOk%20this%20is%20not%20at%20all%20what%20I%20thought%20you%20were%20trying%20to%20do!%3CBR%20%2F%3E%3CBR%20%2F%3ESome%20questions%3A%3CBR%20%2F%3E%3CBR%20%2F%3E-%20how%20many%20bussers%20can%20there%20be%3F%20(presumably%20between%200%20and%20some%20number.%201%3F%203%3F%20something%20else%3F)%3CBR%20%2F%3E-%20does%20every%20busser%20get%20a%20%25%20of%20all%20the%20servers'%20tips%3F%3CBR%20%2F%3E-%20how%20many%20runners%20can%20there%20be%3F%20(again%2C%20is%20it%20between%200%20and%20some%20number%3F%20Is%20there%20a%20maximum%20number%20of%20runners%3F)%3CBR%20%2F%3E-%20does%20every%20runner%20get%20a%20%25%20of%20every%20server's%20tips%3F%20If%20so%2C%20why%20does%20Beth%20not%20have%20any%20tip%20money%20next%20to%20her%20name%20in%20cells%20N7%3AP7%3F%3CBR%20%2F%3E-%20it%20looks%20like%20the%20bartender(s)%20get%2025%25%20of%20whatever%20is%20left%20over%20after%20giving%20money%20to%20the%20bussers%20and%20runners.%20Does%20every%20bartender%20get%2025%25%20of%20what%20remains%3F%20What's%20the%20maximum%20number%20of%20bartenders%20there%20can%20be%3F%20Presumably%20not%20that%20many%2C...%20or%20the%20server%20would%20have%20nothing%20left!%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1525170%22%20slang%3D%22en-US%22%3ERe%3A%20Formula%20help%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1525170%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F725726%22%20target%3D%22_blank%22%3E%40OwenPrice%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20know%2C%20I%20prolly%20explained%20it%20horribly%2C%20sorry.%3C%2FP%3E%3CP%3EBussers%2Frunners%2Fbartenders%20are%20an%20entity%2C%20so%2C%20they%20get%207%25%2F7%25%2F25%25%20regardless%20of%20how%20many%20ppl%20are%20doing%20that%20job%2C%200-3.%3C%2FP%3E%3CP%3EBeth%20%26amp%3B%20Manny%20are%20runners%20that%20share%207%25%20of%20the%20tip%20if%20they%20worked%20together%2C%20sometimes%20there's%20only%201%20person%20working.%3C%2FP%3E%3CP%3EBartender%20gets%2025%25%20after%20the%207%25-7%25%20has%20been%20taken%20out.%3C%2FP%3E%3CP%3EMy%20problem%20is%2C%20what%20formula%20would%20it%20be%20if%20there%20was%20only%201%20runner%20or%20busser%20working.%20What%20would%20be%20left%20after%20to%20take%20the%2025%25.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1525193%22%20slang%3D%22en-US%22%3ERe%3A%20Formula%20help%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1525193%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F729871%22%20target%3D%22_blank%22%3E%40titodona%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EOk%2C%20I%20understand%20now.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIf%20you%20check%20the%20sum%20of%20hours%20worked%20for%20bussers%20and%20runners%20respectively%2C%20and%20only%20subtract%20when%20there%20are%20some%20hours%20worked%20by%20at%20least%20one%20busser%20or%20runner%2C%20then%20again%20only%20subtract%20from%20%3CEM%3Ethat%3C%2FEM%3E%20when%20there%20are%20at%20least%20some%20hours%20worked%20by%20a%20bartender%2C%20you'll%20get%20what%20you%20need.%3CBR%20%2F%3E%3CBR%20%2F%3ESo%2C%20for%20cell%20H2%20for%20Kristi%2C%20for%20example%2C%20you%20could%20use%20this%3A%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-excel%22%3E%3CCODE%3E%3DG2-IF(SUM(%24L%242%3A%24L%243)%26gt%3B0%2C%24N%242%2C0)-IF(SUM(%24L%246%3A%24L%247)%26gt%3B0%2C%24N%246%2C0)%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3EThat%20is%20to%20say%2C%20subtract%20from%20the%20total%20tips%20earned%2C%20the%20amount%20for%20the%20bussers%20only%20if%20bussers%20hours%20were%20greater%20than%20zero%2C%20and%20the%20amount%20for%20the%20runners%20only%20if%20the%20runners%20hours%20were%20greater%20than%20zero.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThis%20amount%20is%20then%20what%20you%20calculate%20the%20bartender's%20tips%20from%20(which%20you%20already%20have%20in%20cells%20N10%3AP10).%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThen%20finally%2C%20the%20amount%20left%20for%20the%20server%20is%20column%20H%20minus%20the%20bartender's%20tips%20but%20only%20if%20there%20were%20bartender%20hours%20worked.%20So%20this%20formula%20goes%20in%20B10%3A%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-excel%22%3E%3CCODE%3E%3DH2-IF(SUM(%24L%2410%3A%24L%2411)%26gt%3B0%2C%24N%2410%2C0)%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20edited%20a%20copy%20of%20your%20workbook%20on%20the%20sheet%20%22New%22.%20See%20attached.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1525222%22%20slang%3D%22en-US%22%3ERe%3A%20Formula%20help%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1525222%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F725726%22%20target%3D%22_blank%22%3E%40OwenPrice%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you%20so%20much!!!!%20Problem%20solved!!%20Another%20satisfied%20customer.%20Appreciate%20the%20help.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
New Contributor

Hi,

 

I am trying to figure out a formula to not count certain values if there's 0 in a cell

 

Basically if c3<0 then don't add the values from D3-D5-D8-D9 

 

Makes sense? help????

7 Replies
Highlighted

@titodona 

 

I am not sure if this is what you are looking for ... if it is not please ignore it.

Summe ProduktSumme Produkt

Freehand copied from the internet

If it is the solution for you then i would be happy to find out if I could help with a thumbs up

 

Nikolino

I know I don't know anything (Socrates)

 

 

 

Highlighted

@titodona 

 


I am trying to figure out a formula to not count certain values if there's 0 in a cell

 

Basically if c3<0 then don't add the values from D3-D5-D8-D9 


You have said that you want to count values as well as don't add the values.

 

I'm not sure whether you want to count or sum, so here's both.

 

In the following formulas, the length of the array of 1/0 values is determined by the length of the data in column D (excluding the header) and the position of the 0s are determined by your request to exclude specifically D3, D5, D8 and D9.

 

As such, your exact implementation may differ.

 

SUM:

 

=SUMPRODUCT($D$2:$D$14,N(({1;0;1;0;1;1;0;0;1;1;1;1;1}+($C$3>=0))>0))


COUNT:

 

=SUMPRODUCT(N(({1;0;1;0;1;1;0;0;1;1;1;1;1}+($C$3>=0))>0))


As you can see, when C3 is less than 0, the sum of my sample data is 102 and the count is 9.

OwenPrice_0-1594843696934.png

 

 

When C3 is 1, the sum is 158 and the count is 13.

OwenPrice_1-1594843860416.png

 

Please include some sample data and scenarios with expected outcome in case this is not what you intended.

Please see attached and let me know if this helps.

 

Highlighted

@OwenPrice 

Hi, I've added the sheet I'm working with if.

In the "add if a busser/runner wasn't working" that result should be if only 7% was taken rather than 14%.

 

Highlighted
Ok this is not at all what I thought you were trying to do!

Some questions:

- how many bussers can there be? (presumably between 0 and some number. 1? 3? something else?)
- does every busser get a % of all the servers' tips?
- how many runners can there be? (again, is it between 0 and some number? Is there a maximum number of runners?)
- does every runner get a % of every server's tips? If so, why does Beth not have any tip money next to her name in cells N7:P7?
- it looks like the bartender(s) get 25% of whatever is left over after giving money to the bussers and runners. Does every bartender get 25% of what remains? What's the maximum number of bartenders there can be? Presumably not that many,... or the server would have nothing left!
Highlighted

@OwenPrice 

I know, I prolly explained it horribly, sorry.

Bussers/runners/bartenders are an entity, so, they get 7%/7%/25% regardless of how many ppl are doing that job, 0-3.

Beth & Manny are runners that share 7% of the tip if they worked together, sometimes there's only 1 person working.

Bartender gets 25% after the 7%-7% has been taken out.

My problem is, what formula would it be if there was only 1 runner or busser working. What would be left after to take the 25%. 

Highlighted
Best Response confirmed by titodona (New Contributor)
Solution

@titodona 

 

Ok, I understand now.

 

If you check the sum of hours worked for bussers and runners respectively, and only subtract when there are some hours worked by at least one busser or runner, then again only subtract from that when there are at least some hours worked by a bartender, you'll get what you need.

So, for cell H2 for Kristi, for example, you could use this:

=G2-IF(SUM($L$2:$L$3)>0,$N$2,0)-IF(SUM($L$6:$L$7)>0,$N$6,0)

That is to say, subtract from the total tips earned, the amount for the bussers only if bussers hours were greater than zero, and the amount for the runners only if the runners hours were greater than zero.

 

This amount is then what you calculate the bartender's tips from (which you already have in cells N10:P10).

 

Then finally, the amount left for the server is column H minus the bartender's tips but only if there were bartender hours worked. So this formula goes in B10:

=H2-IF(SUM($L$10:$L$11)>0,$N$10,0)

 

I edited a copy of your workbook on the sheet "New". See attached.

Highlighted

@OwenPrice 

Thank you so much!!!! Problem solved!! Another satisfied customer. Appreciate the help.