N Nitin Shardul Member Aug 5, 2014 #1 Hello Sir, Please find attached file for more clarity. Thanks, Nitin Attachments sum & discount.xlsx sum & discount.xlsx 15.3 KB · Views: 9
Somendra Misra Excel Ninja Aug 5, 2014 #2 Hi Nitin, Can you explain the logic of your problem, how you are expecting 500 in E5?? Regards,
N Nitin Shardul Member Aug 5, 2014 #3 Somendra Misra said: Hi Nitin, In E5 If B5:D5 is greater than 0 then 5% is deducted from the sum or Sum=B5:D5, Hence 500 in E5 Can you explain the logic of your problem, how you are expecting 500 in E5?? Regards, Click to expand...
Somendra Misra said: Hi Nitin, In E5 If B5:D5 is greater than 0 then 5% is deducted from the sum or Sum=B5:D5, Hence 500 in E5 Can you explain the logic of your problem, how you are expecting 500 in E5?? Regards, Click to expand...
Somendra Misra Excel Ninja Aug 5, 2014 #4 @Nitin Shardul Two Alternative: 1. =IF(SUMPRODUCT(--(B5:D5>0))=3,SUM(B5:D5)-(SUM(B5:D5)*5%),SUM(B5:D5)) --- Normal formula in E5 and copy down. 2.=IF(AND(B5:D5>0),SUM(B5:D5)-(SUM(B5:D5)*5%),SUM(B5:D5)) in E5 and copy down... this is array formula so must be entered with Ctrl+Shift+Enter. Regards,
@Nitin Shardul Two Alternative: 1. =IF(SUMPRODUCT(--(B5:D5>0))=3,SUM(B5:D5)-(SUM(B5:D5)*5%),SUM(B5:D5)) --- Normal formula in E5 and copy down. 2.=IF(AND(B5:D5>0),SUM(B5:D5)-(SUM(B5:D5)*5%),SUM(B5:D5)) in E5 and copy down... this is array formula so must be entered with Ctrl+Shift+Enter. Regards,
Hui Excel Ninja Staff member Aug 5, 2014 #6 Why use: SUM(B5:D5)-(SUM(B5:D5)*5%) in Somendras formulas When: SUM(B5:D5)*95% is the same
Hui Excel Ninja Staff member Aug 5, 2014 #7 Heres a slight twist: =SUM(B5:D5)*(1-(5%*(SUMPRODUCT(--(B5:D5>0))=3)))
Somendra Misra Excel Ninja Aug 5, 2014 #8 Sure Hui ... That' thing not came to my mind @ first instinct. If values are always going to be +ve or 0 than here another option: =IF(MIN(B5:D5),SUM(B5:D5)*0.95,SUM(B5:D5)) Regards,
Sure Hui ... That' thing not came to my mind @ first instinct. If values are always going to be +ve or 0 than here another option: =IF(MIN(B5:D5),SUM(B5:D5)*0.95,SUM(B5:D5)) Regards,