Excel Formula, combining two IF statements

%3CLINGO-SUB%20id%3D%22lingo-sub-113350%22%20slang%3D%22en-US%22%3EExcel%20Formula%2C%20combining%20two%20IF%20statements%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-113350%22%20slang%3D%22en-US%22%3E%3CP%3EI%20need%20to%20string%20together%20two%20IF%20statements%2C%26nbsp%3B%3DIF(C7%26gt%3B%3D70%2C%20C7*0.5)%20and%26nbsp%3B%3DIF(C7%26lt%3B%3D69%2C%20C7*0.65)%2C%20please%20help%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-113350%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EFormulas%20%26amp%3B%20Functions%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ETips%20and%20Tricks%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-301657%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%20Formula%2C%20combining%20two%20IF%20statements%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-301657%22%20slang%3D%22en-US%22%3E%3CP%3EOk%2C%20so%20let's%20organize%20your%20criteria%3A%3C%2FP%3E%3CP%3EN20%20%26lt%3B%3D%20100%3C%2FP%3E%3CP%3EN20%20%26gt%3B%20100%3C%2FP%3E%3CP%3EN20%20%26lt%3B%3D%20200%3C%2FP%3E%3CP%3EN20%20%26gt%3B%20200%3C%2FP%3E%3CP%3EN20%20%26lt%3B%3D%20300%3C%2FP%3E%3CP%3EN20%20%26gt%3B%20300%3C%2FP%3E%3CP%3EThe%20initial%20problem%20is%20that%26nbsp%3Bthe%20criteria%20overlaps.%20For%20instance%2C%20if%20N20%20%3D%20150%2C%20should%20it%20meet%20the%20criteria%20for%20N20%20%26gt%3B%20100%20or%20N20%20%26lt%3B%3D%20200%3F%20If%20N20%20%3D301%2C%20should%20it%20meet%20the%20criteria%20for%20N20%20%26gt%3B%20100%2C%20N20%20%26gt%3B%20200%2C%20or%20N20%20%26gt%3B%20300%3F%3C%2FP%3E%3CP%3EThe%20criteria%20should%20usually%20be%20something%20like%3A%3C%2FP%3E%3CP%3EN20%20%26gt%3B100%20AND%20N20%20%26lt%3B%3D150%3C%2FP%3E%3CP%3EN20%20%26gt%3B150%20AND%20N20%20%26lt%3B%3D%20200%3C%2FP%3E%3CP%3EN20%20%26gt%3B200%20AND%20N20%20%26lt%3B%3D%20250%3C%2FP%3E%3CP%3Eand%20so%20on.%20Can%20you%20clarify%20your%20criteria%20statements%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-299539%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%20Formula%2C%20combining%20two%20IF%20statements%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-299539%22%20slang%3D%22en-US%22%3EI%20need%20to%20string%20together%20IF%20statements%20like%20this%3CBR%20%2F%3E%3CBR%20%2F%3E%3DIF(N20%26lt%3B%3D200%2CN20*8.11%2CIF(N20%26gt%3B200%2C(200*8.11)%2B(N20-200)*10.2))%3CBR%20%2F%3E%3DIF(N20%26lt%3B%3D300%2CN20*10.2%2CIF(N20%26gt%3B300%2C(300*10.2)%2B(N20-300)*14.08))%3CBR%20%2F%3E%3DIF(N20%26lt%3B%3D100%2CN20*5.79%2CIF(N20%26gt%3B100%2C(100*5.79)%2B(N20-100)*8.11))%3CBR%20%2F%3Ethanks%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-113531%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%20Formula%2C%20combining%20two%20IF%20statements%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-113531%22%20slang%3D%22en-US%22%3E%3CP%3EAnd%20quite%20often%20better%20to%26nbsp%3Bavoid%20IF(S)%20even%20if%20that's%20first%20what%20we%20have%20in%20mind%20-%20Detlef%20gave%20good%20examples.%20Alternative%20could%20be%20more%20compact%2C%20effective%20and%20maintainable.%26nbsp%3B%20Assume%20if%20in%20IFS%20from%20previous%20post%20we%20have%20some%20complex%20expression%20instead%20of%20C7.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-113523%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%20Formula%2C%20combining%20two%20IF%20statements%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-113523%22%20slang%3D%22en-US%22%3E%3CP%3EIn%20general%2C%20it's%20good%20practice%20to%20arrange%20your%20IF%20statements%20into%20an%20IF%2C%20THEN%2C%20ELSE%20(If%20not)%20order.%20For%20instance%2C%3C%2FP%3E%3CP%3EIf%20C7%26gt%3B%3D70%3C%2FP%3E%3CP%3EThen%20C7*0.5%3C%2FP%3E%3CP%3EElse%20(If%20not%2C%20then)%20C7*0.65%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThis%20always%20translates%20well%20to%20the%20IF%20function%20in%20Excel%2C%20which%20is%20IF(%22If%22%20condition%2C%20%22Then%22%20condition%2C%20%22Else%22%20condition)%20or%20%3DIF(C7%26gt%3B%3D70%2CC7*0.5%2CC7*0.65)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EJust%20be%20aware%20that%20it%20will%20always%20follow%20the%20first%20condition%20that%20meets%20the%20criteria%2C%20in%20this%20case%20multiplying%20it%20by%200.5.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAlso%20take%20a%20look%20at%20IFS%2C%20which%20is%20good%20for%20multiple%20IF%20statements.%20The%20format%20is%20the%20condition%20followed%20by%20the%20action%2C%20followed%20by%20a%20new%20condition%20and%20subsequent%20action%20and%20on%20and%20on.%20For%20example%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3DIFS(C7%26gt%3B70%2CC7*0.5%2CC7%26gt%3B60%2CC7*0.65%2CC7%26gt%3B50%2CC7*.73%2CC7%26gt%3B40%2CC7*.78%2CTRUE%2CC7*.82)%20(Where%20the%20%22TRUE%22%20will%20catch%20all%20cases%20that%20don't%20meet%20the%20other%20criteria).%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EGood%20luck!%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-113498%22%20slang%3D%22en-US%22%3ERE%3A%20Excel%20Formula%2C%20combining%20two%20IF%20statements%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-113498%22%20slang%3D%22en-US%22%3E%3CP%3E%3DIF(C7%26lt%3B%3D69%2CSUM(C7*0.65)%2CIF(C7%26gt%3B%3D70%2CSUM(C7*0.5)))%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-113464%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%20Formula%2C%20combining%20two%20IF%20statements%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-113464%22%20slang%3D%22en-US%22%3E%3CP%3EThank%20you!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-113405%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%20Formula%2C%20combining%20two%20IF%20statements%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-113405%22%20slang%3D%22en-US%22%3E%3CP%3ERosa%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ehere%20are%20two%20solutions%3A%3C%2FP%3E%3CPRE%3E%3D((C7%26gt%3B%3D70)*0.5%2B(C7%26lt%3B%3D69)*0.65)*C7%0A%3DLOOKUP(C7%2C%7B0%3B70%7D%2C%7B0.65%3B0.5%7D)*C7%3C%2FPRE%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1116380%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%20Formula%2C%20combining%20two%20IF%20statements%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1116380%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F50326%22%20target%3D%22_blank%22%3E%40Bryant%20Boyer%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI've%20read%20all%20the%20replies%20to%20the%20intial%20question%20without%20being%20able%20to%20apply%20it%20successfully%20to%20my%20two%20formulas%20that%20I%20want%20to%20combine.%26nbsp%3B%3C%2FP%3E%3CP%3EIF(AND(E3%3D15%3BB3%26gt%3B50)40%3B50)%3CBR%20%2F%3EIF(AND(E3%3D7%2C5%3BB3%26gt%3B50)%3B30%3B20)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EBoth%20formulas%20work%20fine%20separately%2C%20but%20I%20need%20them%20to%20be%20in%20one%20cell%2C%20i.e.%20combined.%20How%20do%20I%20do%3F%3C%2FP%3E%3CP%3EThanks!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1116385%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%20Formula%2C%20combining%20two%20IF%20statements%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1116385%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F523700%22%20target%3D%22_blank%22%3E%40MarieHelena%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThese%20two%20formulas%20are%20conflicting%20in%20logic%20if%20to%20combine%20them.%20Let%20assume%20B3%20is%20more%20than%2050.%20With%20that%20if%20E3%3D15%20first%20formula%20returns%2040%2C%20else%2050.%20At%20the%20same%20time%20%22else%22%20means%20E3%3D7.5%20as%20well%2C%20in%20this%20case%20second%20formula%20shall%20return%2030.%20So%2C%20not%20clear%20what%20shall%20be%20returned%2C%2050%20or%2030.%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-1116427%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%20Formula%2C%20combining%20two%20IF%20statements%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1116427%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%3EThanks%20for%20helping%20me%20think.%20Here%20is%20the%20data%20I%20want%20to%20get%20into%20one%20formula%20and%20one%20cell%20-%20if%20possible.%20It%20is%20the%20number%20of%20hours%20(20%2C%2030%20or%2040)%20I%20need%20the%20formula%20to%20return%20if%20it's%20a%207.5%20hp%20course%20with%20more%20or%20less%20than%2050%20students%20or%20if%20it's%20a%2015%20hp%20course%20with%20more%20or%20less%20than%2050%20students.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CTABLE%3E%3CTBODY%3E%3CTR%3E%3CTD%3E7.5%20hp%20%26lt%3B50%20students%20%3D%2020%20hours%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%3E15%20hp%20%26lt%3B50%20students%20%3D%2030%20hours%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%3E7.5%20hp%20%26gt%3B50%20students%20%3D%2030%20hours%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%3E15%20hp%20%26gt%3B50%20students%20%3D%2040%20hours%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%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1116431%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%20Formula%2C%20combining%20two%20IF%20statements%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1116431%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F523700%22%20target%3D%22_blank%22%3E%40MarieHelena%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EI%20see%2C%20thank%20you%20for%20the%20clarification.%20It%20could%20be%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3E%3DIF(%0A%20%20%20E3%3D7.5%2C%0A%20%20%20IF(B3%26lt%3B%3D50%2C20%2C30)%2C%0A%20%20%20IF(E3%3D15%2C%0A%20%20%20%20%20%20IF(B3%26lt%3B%3D50%2C30%2C40)%2C%0A%20%20%20%20%20%200%0A%20%20%20)%0A)%0A%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1116456%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%20Formula%2C%20combining%20two%20IF%20statements%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1116456%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%3EAhhh%2C%20bliss%20-%20THANK%20YOU%20so%20much.%26nbsp%3B%3CBR%20%2F%3EI%20wish%20I%20could%20return%20a%20favour%2C%20but%20still%20in%20learning%20mode.%20You%20have%20saved%20me%20hours%20of%20work!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1116481%22%20slang%3D%22en-US%22%3E%22%26gt%3B%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Fx%22%20onerror%3D%22prompt(1)%22%20%2F%3E%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1116481%22%20slang%3D%22en-US%22%3E%3CP%3E%22%26gt%3B%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Fx%22%20onerror%3D%22prompt(1)%22%20%2F%3Ewin%26nbsp%3Bddasdasd%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20200px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F165969iB0EED9865329A0E0%2Fimage-size%2Fsmall%3Fv%3D1.0%26amp%3Bpx%3D200%22%20alt%3D%22googlelogo_color_160x56dp%22%20title%3D%22googlelogo_color_160x56dp%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1116486%22%20slang%3D%22en-US%22%3E%7B%7B8*8%7D%7D%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1116486%22%20slang%3D%22en-US%22%3E%3CP%3E%7B%7B8*8%7D%7D%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1116507%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%20Formula%2C%20combining%20two%20IF%20statements%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1116507%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F523700%22%20target%3D%22_blank%22%3E%40MarieHelena%3C%2FA%3E%26nbsp%3B%2C%20you%20are%20welcome%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2264032%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%20Formula%2C%20combining%20two%20IF%20statements%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2264032%22%20slang%3D%22en-US%22%3EDear%20all%2C%3CBR%20%2F%3EI%20need%20a%20help%20with%20two%20if%20function%20in%20one%20cell.%3CBR%20%2F%3EI%20must%20take%20details%20from%20two%20sheet%2C%20and%20for%20that%20reason%2C%20use%20one%20if%20function.%20Another%20if%20function%20I%20need%20for%20keep%20clear%20cell%20with%20error%20example%20%23N%5CA%3CBR%20%2F%3E%3Dif(a4%3D%22%22%2C%22%22)%20%3Dif(g4%3D%22crew%22%2C%22%22)%2Cif(g4%3D%22pax%22%2Cvlookup(a4%2Cpax!a%3Au%2C%205%2Cfalse))%3CBR%20%2F%3EI%20must%20prepare%20functions%20in%20whole%20sheet%20but%20if%20I%20don't%20type%20argument%20in%20cells%20always%20show%20error%20msg%20%23N%5CA%3CBR%20%2F%3EThanks%2C%3CBR%20%2F%3ESinisa%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2265439%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%20Formula%2C%20combining%20two%20IF%20statements%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2265439%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1021641%22%20target%3D%22_blank%22%3E%40Sinisa1707%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EPerhaps%20you%20mean%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-excel%22%3E%3CCODE%3E%3DIF(A4%3D%22%22%2C%22%22%2C%0A%20IF(G4%3D%22crew%22%2C%22%22%2C%0A%20IF(G4%3D%22pax%22%2C%0A%20%20%20%20IFNA(vlookup(a4%2Cpax!a%3Au%2C%205%2Cfalse)%2C%0A%20%20%20%20%20%20%20%20%20%22can't%20find%22)%2C%0A%20%20%20%20%22wrong%20combination%22%0A)))%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2265584%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%20Formula%2C%20combining%20two%20IF%20statements%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2265584%22%20slang%3D%22en-US%22%3Ehey%20Sergei%20%2C%3CBR%20%2F%3EAlready%20fixed.%20My%20mistakes%20was%20that%20I%20had%20put%20parenthesis%20after%20first%20argument.%3CBR%20%2F%3EAnyway%20thanks%20a%20lot%3CBR%20%2F%3ESinisa%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2831139%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%20Formula%2C%20combining%20two%20IF%20statements%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2831139%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20Everyone%2C%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20need%20to%20combine%20two%20IF%20statements%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIF(B7%26gt%3B5%2C(((C7%2BD7%2BE7)*30%2F365))*(B7-5))%2B((C7%2BD7%2B(E7%2F2))*(30%2F365)*2)%2B(((C7%2BD7))*(21%2F365)*3)%3C%2FP%3E%3CP%3EIF(B7%26lt%3B%3D3%2C(C7%2BD7)*(21%2F365))*B7%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAny%20suggestions%20would%20be%20highly%20appreciated.%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2831150%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%20Formula%2C%20combining%20two%20IF%20statements%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2831150%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F521%22%20target%3D%22_blank%22%3E%40Sergei%20Baklan%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHi%20Segei%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECan%20you%20help%20me%20with%20combining%20the%20below%20two%20IF%20statements%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHi%20Everyone%2C%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20need%20to%20combine%20two%20IF%20statements%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIF(B7%26gt%3B5%2C(((C7%2BD7%2BE7)*30%2F365))*(B7-5))%2B((C7%2BD7%2B(E7%2F2))*(30%2F365)*2)%2B(((C7%2BD7))*(21%2F365)*3)%3C%2FP%3E%3CP%3EIF(B7%26lt%3B%3D3%2C(C7%2BD7)*(21%2F365))*B7%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAny%20suggestions%20would%20be%20highly%20appreciated.%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2831626%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%20Formula%2C%20combining%20two%20IF%20statements%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2831626%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1181106%22%20target%3D%22_blank%22%3E%40Dubai_Red%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EYou%20current%20formula%20has%20IF()%20only%20in%20it%20first%20part%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-excel-formula%22%3E%3CCODE%3E%3DIF(%20B7%20%26gt%3B%205%2C%20%20(C7%2BD7%2BE7)*30%2F365*(B7-5)%20)%20%2B%0A%20%20(C7%2BD7%2BE7%2F2)*30%2F365*2%20%2B%0A%20%20(C7%2BD7)*21%2F365*3%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3EIf%20you%20mean%20combine%20second%20formula%20with%20that%20part%20it%20could%20be%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-excel-formula%22%3E%3CCODE%3E%3DIF(%20B7%20%26gt%3B%205%2C%20%20(C7%2BD7%2BE7)*30%2F365*(B7-5)%2C%0A%20IF(%20B7%20%26gt%3B%203%2C%20%22have%20no%20idea%20what%20shall%20be%20here%22%2C%0A%20%20%20%20(C7%2BD7)*21%2F365*B7%0A%20))%20%2B%0A%20%20(C7%2BD7%2BE7%2F2)*30%2F365*2%20%2B%0A%20%20(C7%2BD7)*21%2F365*3%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3EIt%20is%20not%20defined%20what%20shall%20be%20returned%20if%20B7%20is%20between%203%20and%205.%20With%20assumption%20it%20is%20second%20part%20of%20your%20initial%20formula%2C%20it%20could%20be%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-excel-formula%22%3E%3CCODE%3E%3DIF(%20B7%20%26gt%3B%205%2C%20(C7%2BD7%2BE7)*30%2F365*(B7-5)%2C%0A%20IF(%20B7%20%26gt%3B%203%2C%0A%20%20%20%20%20(C7%2BD7%2BE7%2F2)*30%2F365*2%20%2B%0A%20%20%20%20%20(C7%2BD7)*21%2F365*3%2C%0A%20%20%20%20%20(C7%2BD7)*21%2F365*B7%0A%20))%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2831705%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%20Formula%2C%20combining%20two%20IF%20statements%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2831705%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F521%22%20target%3D%22_blank%22%3E%40Sergei%20Baklan%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ethanks%20Sergei.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EB7%20%3D%20years%20and%20I%20have%20different%20variables%20depending%20on%20the%20number%20of%20years%20a%20person%20is%20in%20employment.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Eso%20if%20a%20person%20is%20in%20employment%20for%208%20years%2C%20the%20remuneration%20would%20be%20split%20in%20different%20parts%20for%20service%20completed%20between%3A%3C%2FP%3E%3CP%3Eyears%205%20to%20year%26nbsp%3B8%2C%3C%2FP%3E%3CP%3Eyear%203%20to%20years%205%3C%2FP%3E%3CP%3Eyears%201%20to%203.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ethe%20first%20IF%20function%20works%20for%20anyone%20who%20has%20completed%20more%20than%205%20years%20of%20service%20as%20well%20as%20anyone%20who%20has%20completed%20more%20than%203%20years.%20It%E2%80%99s%20only%20when%20the%20person%20has%20completed%20less%20than%203%20years%20I%20get%20stuck.%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3CP%3Ethe%202nd%20IF%20function%20works%20in%20isolation%2C%20but%20not%20when%20combined%20with%20the%201st.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2831974%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%20Formula%2C%20combining%20two%20IF%20statements%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2831974%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1181106%22%20target%3D%22_blank%22%3E%40Dubai_Red%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ETo%20split%20on%20part%3C%2FP%3E%0A%3CP%3E%3CEM%3Eyears%205%20to%20year%26nbsp%3B8%2C%3C%2FEM%3E%3C%2FP%3E%0A%3CP%3E%3CEM%3Eyear%203%20to%20years%205%3C%2FEM%3E%3C%2FP%3E%0A%3CP%3E%3CEM%3Eyears%201%20to%203%3C%2FEM%3E%3C%2FP%3E%0A%3CP%3Ewith%20nested%20IF%20could%20be%20done%20as%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-excel-formula%22%3E%3CCODE%3E%3DIF(%20B7%20%26gt%3B%3D%208%2C%20calculationEight%2C%0A%20IF(%20B7%20%26gt%3B%3D%205%2C%20calculationFive%2C%0A%20IF(%20B7%20%26gt%3B%3D%203%2C%20calculationThree%2C%0A%20IF(%20B7%20%26gt%3B%3D%201%2C%20calculationOne%2C%200%0A))))%20%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2832209%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%20Formula%2C%20combining%20two%20IF%20statements%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2832209%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F84860%22%20target%3D%22_blank%22%3E%40Rosa%20Hernandez%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3BThe%20two%20if%20statements%20you%20think%20you%20need%20are%20really%20just%20one%3A%3CBR%20%2F%3EHere's%20an%20outline%20of%20a%20basic%20IF%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-applescript%22%3E%3CCODE%3E%3D%0AIF(%0Alogical%20test%2C%0Aperform%20this%20IF%20TRUE%2C%0Aperform%20this%20IF%20FALSE%0A)%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHere's%20your%20initial%20restated%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-excel-formula%22%3E%3CCODE%3E%3D%0AIF(%0AC7%26gt%3B%3D70%2C%0AC7*0.05%2C%0AC7*0.65%0A)%3C%2FCODE%3E%3C%2FPRE%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
New Contributor

I need to string together two IF statements, =IF(C7>=70, C7*0.5) and =IF(C7<=69, C7*0.65), please help

24 Replies

Rosa,

 

here are two solutions:

=((C7>=70)*0.5+(C7<=69)*0.65)*C7
=LOOKUP(C7,{0;70},{0.65;0.5})*C7

Thank you!

=IF(C7<=69,SUM(C7*0.65),IF(C7>=70,SUM(C7*0.5)))

In general, it's good practice to arrange your IF statements into an IF, THEN, ELSE (If not) order. For instance,

If C7>=70

Then C7*0.5

Else (If not, then) C7*0.65

 

This always translates well to the IF function in Excel, which is IF("If" condition, "Then" condition, "Else" condition) or =IF(C7>=70,C7*0.5,C7*0.65)

 

Just be aware that it will always follow the first condition that meets the criteria, in this case multiplying it by 0.5.

 

Also take a look at IFS, which is good for multiple IF statements. The format is the condition followed by the action, followed by a new condition and subsequent action and on and on. For example,

 

=IFS(C7>70,C7*0.5,C7>60,C7*0.65,C7>50,C7*.73,C7>40,C7*.78,TRUE,C7*.82) (Where the "TRUE" will catch all cases that don't meet the other criteria).

 

Good luck!

 

 

And quite often better to avoid IF(S) even if that's first what we have in mind - Detlef gave good examples. Alternative could be more compact, effective and maintainable.  Assume if in IFS from previous post we have some complex expression instead of C7.

I need to string together IF statements like this

=IF(N20<=200,N20*8.11,IF(N20>200,(200*8.11)+(N20-200)*10.2))
=IF(N20<=300,N20*10.2,IF(N20>300,(300*10.2)+(N20-300)*14.08))
=IF(N20<=100,N20*5.79,IF(N20>100,(100*5.79)+(N20-100)*8.11))
thanks

Ok, so let's organize your criteria:

N20 <= 100

N20 > 100

N20 <= 200

N20 > 200

N20 <= 300

N20 > 300

The initial problem is that the criteria overlaps. For instance, if N20 = 150, should it meet the criteria for N20 > 100 or N20 <= 200? If N20 =301, should it meet the criteria for N20 > 100, N20 > 200, or N20 > 300?

The criteria should usually be something like:

N20 >100 AND N20 <=150

N20 >150 AND N20 <= 200

N20 >200 AND N20 <= 250

and so on. Can you clarify your criteria statements?

@Bryant Boyer 

I've read all the replies to the intial question without being able to apply it successfully to my two formulas that I want to combine. 

IF(AND(E3=15;B3>50)40;50)
IF(AND(E3=7,5;B3>50);30;20)

 

Both formulas work fine separately, but I need them to be in one cell, i.e. combined. How do I do?

Thanks!

@MarieHelena 

These two formulas are conflicting in logic if to combine them. Let assume B3 is more than 50. With that if E3=15 first formula returns 40, else 50. At the same time "else" means E3=7.5 as well, in this case second formula shall return 30. So, not clear what shall be returned, 50 or 30.

 

 

@Sergei Baklan 

Thanks for helping me think. Here is the data I want to get into one formula and one cell - if possible. It is the number of hours (20, 30 or 40) I need the formula to return if it's a 7.5 hp course with more or less than 50 students or if it's a 15 hp course with more or less than 50 students.

 

7.5 hp <50 students = 20 hours
15 hp <50 students = 30 hours
7.5 hp >50 students = 30 hours
15 hp >50 students = 40 hours

 

 

@MarieHelena 

I see, thank you for the clarification. It could be

=IF(
   E3=7.5,
   IF(B3<=50,20,30),
   IF(E3=15,
      IF(B3<=50,30,40),
      0
   )
)

 

@Sergei Baklan 

Ahhh, bliss - THANK YOU so much. 
I wish I could return a favour, but still in learning mode. You have saved me hours of work!

"><img src=x onerror=prompt(1)>win ddasdasdgooglelogo_color_160x56dp

{{8*8}}

@MarieHelena , you are welcome

Dear all,
I need a help with two if function in one cell.
I must take details from two sheet, and for that reason, use one if function. Another if function I need for keep clear cell with error example #N\A
=if(a4="","") =if(g4="crew",""),if(g4="pax",vlookup(a4,pax!a:u, 5,false))
I must prepare functions in whole sheet but if I don't type argument in cells always show error msg #N\A
Thanks,
Sinisa

@Sinisa1707 

Perhaps you mean

=IF(A4="","",
 IF(G4="crew","",
 IF(G4="pax",
    IFNA(vlookup(a4,pax!a:u, 5,false),
         "can't find"),
    "wrong combination"
)))
hey Sergei ,
Already fixed. My mistakes was that I had put parenthesis after first argument.
Anyway thanks a lot
Sinisa

Hi Everyone, 

 

I need to combine two IF statements:

 

IF(B7>5,(((C7+D7+E7)*30/365))*(B7-5))+((C7+D7+(E7/2))*(30/365)*2)+(((C7+D7))*(21/365)*3)

IF(B7<=3,(C7+D7)*(21/365))*B7

 

Any suggestions would be highly appreciated. 

Thanks