Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default I'm a Newbie, Need Formula

Here are the requirements

I need one answer with different parameters within one formula

If amount is less than or equal to 100 then answer will be Zero
If amount is more than 100 but less than or equal to 150 then answer will be
8% of the amount exceeding 100
If amount is more than 150 but less than or equal to 300 then answer will be
25 + 12% of the amount exceeding 150
If amount is more than 300 but less than or equal to 400 then answer will be
50 + 20% of the amount exceeding 300
If amount is more than 400 but less than or equal to 700 then answer will be
75 + 25% of the amount exceeding 400
If amount is more than 700 then answer will be 100 + 35% of the amount
exceeding 700
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,440
Default I'm a Newbie, Need Formula

Several options:

1. You can use my UDF, listed at the end of this post.
In a worksheet, press ALT-F11 to get you to the Visual Basic Editor.
InsertModule. Paste the code of the UDF into the module.
Press ALT-F11 to return to the worksheet. You can use the function there as if it were a built-in function.
2. Look he
http://www.mcgimpsey.com/excel/variablerate.html

The UDF:

' ==================================================
Function PercPerSegment(Amount As Double, Table As Range) As Double
' Niek Otten, March 31, 2006

' Progressive pricing
' First argument is the quantity to be priced
' or the amount to be taxed
' Second argument is the Price or Tax% table (vertical)
' Make sure both ends of the table are correct;
' usually you start with zero and the corresponding price or %
' Any value should be found within the limits of the table, so
' if the top slice is infinite, then use
' something like 99999999999999999 as threshold
' and =NA() as corresponding value

Dim StillLeft As Double
Dim AmountThisSlice As Double
Dim SumSoFar As Double
Dim Counter As Long

StillLeft = Amount

For Counter = 1 To Table.Rows.Count - 1
AmountThisSlice = Application.Min(StillLeft, Table(Counter + 1, 1) _
- Table(Counter, 1))
SumSoFar = SumSoFar + AmountThisSlice * Table(Counter, 2)
StillLeft = StillLeft - AmountThisSlice
Next
PercPerSegment = SumSoFar
End Function
' ================================================== ==


--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"Natalie John" wrote in message ...
| Here are the requirements
|
| I need one answer with different parameters within one formula
|
| If amount is less than or equal to 100 then answer will be Zero
| If amount is more than 100 but less than or equal to 150 then answer will be
| 8% of the amount exceeding 100
| If amount is more than 150 but less than or equal to 300 then answer will be
| 25 + 12% of the amount exceeding 150
| If amount is more than 300 but less than or equal to 400 then answer will be
| 50 + 20% of the amount exceeding 300
| If amount is more than 400 but less than or equal to 700 then answer will be
| 75 + 25% of the amount exceeding 400
| If amount is more than 700 then answer will be 100 + 35% of the amount
| exceeding 700


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 913
Default I'm a Newbie, Need Formula

On Sat, 9 Aug 2008 08:37:27 -0700, Natalie John
wrote:

Here are the requirements

I need one answer with different parameters within one formula

If amount is less than or equal to 100 then answer will be Zero
If amount is more than 100 but less than or equal to 150 then answer will be
8% of the amount exceeding 100
If amount is more than 150 but less than or equal to 300 then answer will be
25 + 12% of the amount exceeding 150
If amount is more than 300 but less than or equal to 400 then answer will be
50 + 20% of the amount exceeding 300
If amount is more than 400 but less than or equal to 700 then answer will be
75 + 25% of the amount exceeding 400
If amount is more than 700 then answer will be 100 + 35% of the amount
exceeding 700


If your amount is in cell A1, try this formula in the cell where you
want you answer

=LOOKUP(A1,{-999,100,150,300,400,700},{0,0,25,50,75,100})+(A1-LOOKUP(G5,{-999,100,150,300,400,700}))*LOOKUP(A1,{-999,100,150,300,400,700},{0,0.08,0.12,0.2,0.25,0.3 5})

Note: -999 is just a number which is less that the minimum possible
amount. The other numbers all come from you description.

Hope this helps / Lars-Åke


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 360
Default I'm a Newbie, Need Formula

=IF(A2<=100,0,IF(A2<=150,(A2-100)*0.08,IF(A2<=150,
(A2-100)*0.08,IF(A2<=300,((A2-150)*0.12)+25,IF(A2<=400,
((A2-300)*0.2)+50,IF(A2<=700,((A2-400)*0.25)+75,IF(A2700,
((A2-700)*0.35)+A2-700)+100))))))

Cliff Edwards

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 913
Default I'm a Newbie, Need Formula

On Sat, 9 Aug 2008 13:16:58 -0700 (PDT), ward376
wrote:

=IF(A2<=100,0,IF(A2<=150,(A2-100)*0.08,IF(A2<=150,
(A2-100)*0.08,IF(A2<=300,((A2-150)*0.12)+25,IF(A2<=400,
((A2-300)*0.2)+50,IF(A2<=700,((A2-400)*0.25)+75,IF(A2700,
((A2-700)*0.35)+A2-700)+100))))))

Cliff Edwards


I think the end of this formula, when amount is more than 700, does
not match the requirement
"100 + 35% of the amount exceeding 700".
There is one "A2-700" to much there.

Try this instead:

=IF(A2<=100,0,IF(A2<=150,(A2-100)*0.08,IF(A2<=150,
(A2-100)*0.08,IF(A2<=300,((A2-150)*0.12)+25,IF(A2<=400,
((A2-300)*0.2)+50,IF(A2<=700,((A2-400)*0.25)+75,(A2-700)*0.35+100))))))

Hope this helps / Lars-Åke


  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 360
Default I'm a Newbie, Need Formula

Nuh-uh.

Cliff Edwards

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Formula Problem for Newbie - Please! Terri[_2_] New Users to Excel 4 March 26th 08 10:30 PM
Real Newbie newbie question Dave New Users to Excel 0 January 10th 07 08:55 PM
formula series (newbie) Sam Excel Worksheet Functions 3 January 7th 07 09:02 PM
Newbie problem need formula help toddbob Excel Worksheet Functions 3 April 3rd 06 06:24 PM
Newbie needs help deciphering formula. Grimzby Excel Worksheet Functions 2 January 17th 06 04:46 AM


All times are GMT +1. The time now is 03:32 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"