Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Community > MacNN Lounge > Brainteaser: Anyone know how to write an Equation in Excel?

Brainteaser: Anyone know how to write an Equation in Excel?
Thread Tools
Dedicated MacNNer
Join Date: Jul 2001
Location: S.P.Q.R.
Status: Offline
Reply With Quote
Jan 10, 2005, 06:30 PM
 
K, I want to write an equation. I would love to make a little app/apple script for this, but I'm not sure how. Anyways, Excel would be fine for now. Here's what I need...

I need an equation that will calculate the following for me:

30 percent of X up to the first $250,000; plus
25 percent of X up to the next $250,000; plus
20 percent of X up to the next $500,000; plus
15 percent of X up to the next $250,000; plus
10 percent of anything else (i.e., above 1,250,000).


so for example, if X=1,500,000, then it would generate an answer of:
$ 300,000.00 (I think)
     
Dedicated MacNNer
Join Date: Feb 2002
Location: Dallas
Status: Offline
Reply With Quote
Jan 10, 2005, 08:49 PM
 
Originally posted by The Wolf:
K, I want to write an equation. I would love to make a little app/apple script for this, but I'm not sure how. Anyways, Excel would be fine for now. Here's what I need...

I need an equation that will calculate the following for me:

30 percent of X up to the first $250,000; plus
25 percent of X up to the next $250,000; plus
20 percent of X up to the next $500,000; plus
15 percent of X up to the next $250,000; plus
10 percent of anything else (i.e., above 1,250,000).


so for example, if X=1,500,000, then it would generate an answer of:
$ 300,000.00 (I think)
Why not make an "if" statement, a macro, or an array?

turboSPE
     
Ω
Mac Elite
Join Date: Nov 2003
Status: Offline
Reply With Quote
Jan 10, 2005, 11:54 PM
 
Try:

=IF(B1>1250000, (B1-1250000)*0.1+275000, IF(B1>1000000, (B1-1000000)*0.15+237500, IF(B1>500000, (B1-500000)*0.2+137500, IF(B1>250000, (B1-250000)*0.25+75000, B1*0.3))))

B1 is the value of "x"

I would personally go through and assign the "breaks" (1,250,000 etc) as cells, as well as the percentages. This will give it more flexibility when things change.

You will also notice that there is a plus 275000 in the first if statement. This value of 275000 equates to a running sum of the costs. I did not see the point in having massive if calculations when we can determine the cost at 1250000 and then add this to any value over that amount. This is the same for all price breaks.

I think it is correct......
     
Mac Elite
Join Date: Sep 2004
Location: Theory - everything works in theory
Status: Offline
Reply With Quote
Jan 11, 2005, 12:05 AM
 
All right, at first I was going to provide some guidance, but as I thought through it I just started writing the darn Excel equation. As you can see, it's not very pretty, but I think it's doing what you wanted it to. If not, you can use it as a starting point and modify it as you like. Anyway, here it is:

Commission Calculations

EDIT: Omega beat me to it (that's what happens when you start writing a post, walk away for 10 minutes and come back to hit reply), though my code is a bit more flexible.
     
Ω
Mac Elite
Join Date: Nov 2003
Status: Offline
Reply With Quote
Jan 11, 2005, 12:21 AM
 
Do I actually show up as an omega symbol? On all my machines I am a stupid ?.

I also had a fully working spreadsheet, but with no way of hosting it explaining it would have taken so long, that I "dumbed" it down instead.

     
Mac Elite
Join Date: Sep 2004
Location: Theory - everything works in theory
Status: Offline
Reply With Quote
Jan 11, 2005, 01:01 AM
 
Originally posted by _?_:
Do I actually show up as an omega symbol? On all my machines I am a stupid ?..
Heh, I saw your thread in the Feedback Forum asking to have your name changed. So, that's how I know you're "Omega."
     
Ω
Mac Elite
Join Date: Nov 2003
Status: Offline
Reply With Quote
Jan 11, 2005, 01:06 AM
 
Good memory, that was months ago!

     
Dedicated MacNNer
Join Date: Jul 2001
Location: S.P.Q.R.
Status: Offline
Reply With Quote
Jan 11, 2005, 01:30 AM
 
Originally posted by E's Lil Theorem:
All right, at first I was going to provide some guidance, but as I thought through it I just started writing the darn Excel equation *snip*
That is awesome. Pretty enough!!!
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 10:11 AM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2