ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   New Users to Excel (https://www.excelbanter.com/new-users-excel/)
-   -   excel calculation (https://www.excelbanter.com/new-users-excel/173234-excel-calculation.html)

Shiblie Bshara

excel calculation
 
hi,
I need to do a formula that covers the next conditions:

Max= 5000
Total= 5700
Min = ???

if total < max, then min = total*0.06
if total = max, then min = total*0.06
if total max, then min = (max*0.06)+(total-max)


thanx

Mike H

excel calculation
 
Hi,

Try this

=IF(B2B1,(B1*0.06)+(B2-B1),B2*0.06)

Where
B1= max
B2= total

Mike

"Shiblie Bshara" wrote:

hi,
I need to do a formula that covers the next conditions:

Max= 5000
Total= 5700
Min = ???

if total < max, then min = total*0.06
if total = max, then min = total*0.06
if total max, then min = (max*0.06)+(total-max)


thanx


Bernard Liengme

excel calculation
 
The IF formula is good but you can also use an IF-less formula
With Max in A1 and Total in B1
=(B1*0.06)*(B1<=A1)+((A1*0.06)+(B1-A1))*(B1A1)
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
www.stfx.ca/people/bliengme
remove caps from email

"Shiblie Bshara" wrote in message
...
hi,
I need to do a formula that covers the next conditions:

Max= 5000
Total= 5700
Min = ???

if total < max, then min = total*0.06
if total = max, then min = total*0.06
if total max, then min = (max*0.06)+(total-max)


thanx





All times are GMT +1. The time now is 06:21 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com