Addition with 2 formulas in one

justn

New Member
Joined
Apr 7, 2013
Messages
13
Hi, new to this forum and excel. I'm starting to understand the basics with the formulas but this one I can't figure out. I need to take 2 numbers and if they are greater than 50 divide by 20, if less than 50 divide by 10, then add 2 other set of numbers separately and then add my answers to get a final answer.

Thanks in advance
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.

etaf

Well-known Member
Joined
Oct 24, 2012
Messages
7,315
Office Version
  1. 365
Platform
  1. MacOS
you can use IF to do that

but just need the detail

you have cells with two numbers and when added together is that what we are trying to evaluate ?

so assume cells are a1 and a2

=IF( (A1+A2) > 50 , (A1+A2)/20 , (A1+A2)/10 )

where are the other numbers - ?

need the detail and what to do if the result is 50 ?
 
Upvote 0

justn

New Member
Joined
Apr 7, 2013
Messages
13
Thanks for the quick response etaf, ok this is what i want to do maybe i didnt explain it right.I'll try again, first i want to subtract (A1-A2) if this result is >50 i want to divide the # by 20, if the number is <50 i want to divide the number by 10 and then i want to add this # to lets say (A3+A4)

I'm trying to get an answer then dividing that answer by either a 20 or 10 depending if its >50 or <50 then adding it to the answer from (A3+A4)
 
Upvote 0

etaf

Well-known Member
Joined
Oct 24, 2012
Messages
7,315
Office Version
  1. 365
Platform
  1. MacOS
ADVERTISEMENT
=IF(A1-A2 > 50,((A1-A2)/20)+(A3+A4),(A1-A2)/10)+(A3+A4))

what happens if it = 50 ?
 
Upvote 0

etaf

Well-known Member
Joined
Oct 24, 2012
Messages
7,315
Office Version
  1. 365
Platform
  1. MacOS
ADVERTISEMENT
=if(a1-a2 >= 50,((a1-a2)/20)+(a3+a4),(a1-a2)/10)+(a3+a4))
 
Upvote 0

justn

New Member
Joined
Apr 7, 2013
Messages
13
they both work great but one question how do i get the larger number to be used first when subtractiing I found this from someone =max(A1:B1)-min(A1:B1) but how do i incorporate it all in 1 line
 
Last edited:
Upvote 0

justn

New Member
Joined
Apr 7, 2013
Messages
13
tried =IF(ABS(A1-A2) > 50,ABS(A1-A2)/20,ABS(A1-A2)/10)+(A3+A4) window pops up with an error, sorry about the questions Jonmo1 maybe formula to complicated for a newbie..lol
 
Upvote 0

Forum statistics

Threads
1,195,635
Messages
6,010,829
Members
441,569
Latest member
PeggyLee

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top