Page 1
Page 1
Started By
Message

Excel Question - Creating formula with percentage and minimum/maximum value

Posted on 4/6/15 at 8:17 am
Posted by josecanseco
Member since Feb 2009
891 posts
Posted on 4/6/15 at 8:17 am
I've looked online but haven't had any success so I hope someone here can help me out. I am trying to create an excel document for tracking purposes but am getting hung up in one area (so far).

In my scenario, column A is the amount of sale. Column B is the commission on that sale, which should be 5%, but no lower than $35, and no greater than $150. Can anyone help with this? If you need more information please just let me know. Thank you
Posted by BamaAtl
South of North
Member since Dec 2009
21857 posts
Posted on 4/6/15 at 8:27 am to
Nested if statements would work. E.g.:

=IF((0.05*A1)<5,5,IF((0.05*A1)>150,150,0.05*A1))
Posted by josecanseco
Member since Feb 2009
891 posts
Posted on 4/6/15 at 8:37 am to
Thank you - but shouldn't there be a "35" in there somewhere?
Posted by aaronb023
TeamBunt CEO
Member since Feb 2005
11774 posts
Posted on 4/6/15 at 8:42 am to
Yeah, he accidentally did 5,5 in the first if. Should be 35,35.

That's how I would do it too
Posted by josecanseco
Member since Feb 2009
891 posts
Posted on 4/6/15 at 8:44 am to
This is perfect - Thanks!
Posted by josecanseco
Member since Feb 2009
891 posts
Posted on 4/6/15 at 8:48 am to
Ok, one more follow up. With the new formula in, it is leaving it as "35" for all of the empty slots too (worksheet has set amount of lines but some will be unfilled if max sales numbers aren't hit - so right now a blank sheet it still shows them 35 commission for every line available). Is there a way to make it 35 only if values are entered into a previous column?
Posted by BamaAtl
South of North
Member since Dec 2009
21857 posts
Posted on 4/6/15 at 8:48 am to
quote:

Yeah, he accidentally did 5,5 in the first if. Should be 35,35.



Yep! Sorry about that typo.
Posted by BamaAtl
South of North
Member since Dec 2009
21857 posts
Posted on 4/6/15 at 8:49 am to
You can use the isblank function to denote whether a column is filled, or just add another if statement looking for whether the value in A is greater than 0.
Posted by josecanseco
Member since Feb 2009
891 posts
Posted on 4/6/15 at 8:51 am to
Thank you for prompt response - any chance you can show me where to insert that into above formula?
Posted by BamaAtl
South of North
Member since Dec 2009
21857 posts
Posted on 4/6/15 at 9:32 am to
Try this:

=IF(A1<1,".",IF((0.05*A1)<35,35,IF((0.05*A1)>150,150,0.05*A1)))

You can swap out the "." for whatever you want a blank field to show. That's assuming you don't have any sales of less than 1.
Posted by lynxcat
Member since Jan 2008
24118 posts
Posted on 4/6/15 at 8:17 pm to
Don't need the period inside the quotes if he wants the cell to be blank when no sales have happened.
Posted by josecanseco
Member since Feb 2009
891 posts
Posted on 4/6/15 at 10:02 pm to
Thank you all very much, this worked just like I needed it to.
Posted by Spock's Eyebrow
Member since May 2012
12300 posts
Posted on 4/6/15 at 10:40 pm to
This is a bit cleaner in that each subexpression only occurs once:

=IF(ISNUMBER(A1),MAX(35,MIN(A1*0.05,150)),"")

Also, all the literals really ought to be named constants, e.g. MinComm, MaxComm, CommRate.
first pageprev pagePage 1 of 1Next pagelast page
refresh

Back to top
logoFollow TigerDroppings for LSU Football News
Follow us on Twitter, Facebook and Instagram to get the latest updates on LSU Football and Recruiting.

FacebookTwitterInstagram