|
|
excel formula
I need to know how to put in a formula that will let me calculate something
like this.
0 to 5 miles $0
next 25 miles is $2.15 each
next 30 miles is 2.25 each
next 40 miles is 2.10 each
for a total of 100 miles
so if i entered 100 miles it would calculate the first 5 at 0$ then the next
25 at $2.15
then the next 30 at $2.25 then the next 40 at $2.10. for a total of 100
miles and display the correct dollar amount. but if i entered 65 miles it
would calculate the first 5 at 0$ then the next 25 at 2.15 then the next 30
at 2.25 then the next 5 at 2.10 for a total of 65 miles and give the correct
dollar amount.
Thanks Clint.
|
|
0
|
|
|
|
Reply
|
Utf
|
4/5/2010 10:14:01 AM |
|
Hi,
I don't think you tell is what happens after 100 miles. To get a figure for
miles in excess of 100 miles you will need yo adjust the last Number 0.4.
The logic is simple enough , the 0.4 represents the difference to the
previous figure for 61 - 100 miles (2.1) so the final figure of 0.4 would
award 2.5 for all miles in excess of 100.
=SUMPRODUCT(--(A1>{0;5;30;60;100}),(A1-{0;5;30;60;100}),
{0;2.15;0.1;-0.15;0.4})
--
Mike
When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.
"Clinton Spry" wrote:
> I need to know how to put in a formula that will let me calculate something
> like this.
> 0 to 5 miles $0
> next 25 miles is $2.15 each
> next 30 miles is 2.25 each
> next 40 miles is 2.10 each
> for a total of 100 miles
> so if i entered 100 miles it would calculate the first 5 at 0$ then the next
> 25 at $2.15
> then the next 30 at $2.25 then the next 40 at $2.10. for a total of 100
> miles and display the correct dollar amount. but if i entered 65 miles it
> would calculate the first 5 at 0$ then the next 25 at 2.15 then the next 30
> at 2.25 then the next 5 at 2.10 for a total of 65 miles and give the correct
> dollar amount.
> Thanks Clint.
|
|
0
|
|
|
|
Reply
|
Utf
|
4/5/2010 10:45:01 AM
|
|
On Mon, 5 Apr 2010 03:14:01 -0700, Clinton Spry <Clinton
Spry@discussions.microsoft.com> wrote:
>I need to know how to put in a formula that will let me calculate something
>like this.
>0 to 5 miles $0
>next 25 miles is $2.15 each
>next 30 miles is 2.25 each
>next 40 miles is 2.10 each
>for a total of 100 miles
>so if i entered 100 miles it would calculate the first 5 at 0$ then the next
>25 at $2.15
>then the next 30 at $2.25 then the next 40 at $2.10. for a total of 100
>miles and display the correct dollar amount. but if i entered 65 miles it
>would calculate the first 5 at 0$ then the next 25 at 2.15 then the next 30
>at 2.25 then the next 5 at 2.10 for a total of 65 miles and give the correct
>dollar amount.
>Thanks Clint.
One method is to set up a Table where each row is set to the "Change Point" and
the columns are the amount up to that point. Then use a VLOOKUP formula.
For example, set up a Table as follows:
0 $0.00 $0.00
5 $0.00 $2.15
30 $53.75 $2.25
60 $121.25 $2.10
Column 2 is the total amount for the value in column 1. So if your Table was
in G1:I4, then
H1: 0
H2: =(G2-G1)*I1+H1
and fill down to H4.
Then use this formula, with your entry in A1, and Tbl referring to your Table:
=(A1-VLOOKUP(A1,Tbl,1))*VLOOKUP(A1,Tbl,3)+VLOOKUP(A1,Tbl,2)
This has an advantage of being rather easily maintainable so far as any
changes, or extension you wish to make to the table.
--ron
|
|
0
|
|
|
|
Reply
|
Ron
|
4/5/2010 11:25:55 AM
|
|
hI,.
=SUMPRODUCT(--(A1>{0;5;30;60}),A1-{0;5;30;60},{0;2.15;0.1;-0.15})
"Clinton Spry" wrote:
> I need to know how to put in a formula that will let me calculate something
> like this.
> 0 to 5 miles $0
> next 25 miles is $2.15 each
> next 30 miles is 2.25 each
> next 40 miles is 2.10 each
> for a total of 100 miles
> so if i entered 100 miles it would calculate the first 5 at 0$ then the next
> 25 at $2.15
> then the next 30 at $2.25 then the next 40 at $2.10. for a total of 100
> miles and display the correct dollar amount. but if i entered 65 miles it
> would calculate the first 5 at 0$ then the next 25 at 2.15 then the next 30
> at 2.25 then the next 5 at 2.10 for a total of 65 miles and give the correct
> dollar amount.
> Thanks Clint.
|
|
0
|
|
|
|
Reply
|
Utf
|
4/5/2010 12:10:01 PM
|
|
|
3 Replies
179 Views
(page loaded in 0.117 seconds)
Similiar Articles: Excel formula; all negative values return with 0 - microsoft ...Version: 2008 Operating System: Mac OS X 10.5 (Leopard) Processor: Intel I created a formula that counts up elective courses in a spread sheet ro... What Excel formula converts hourly wage to annual salary ...I need help creating a simple formula that converts an hourly wage to an annual salary. ... Excel viewer does not display formula values - microsoft.public ...To all Excel gurus, I have a formula in my 2007 SS =SUM(A1:A10). Viewing this SS in Excel yields the result (100.00) but when I view the SS in Ex... Excel auto accumulation formulas - microsoft.public.excel ...Hi hello, I need a formula for auto accumulation formula like example: John need to give me USD50 everyday for one month, so if he never paid th... Excel does not calculate my formulas - microsoft.public.excel.misc ...This is very strange...Excel does not calculate any formula. I can do a simple =A1+A2, and it just return a zero value. I made sure of the follo... keep formula delete contents - microsoft.public.excel.worksheet ...I'm trying to set up a template in Excel. I wish to keep the formula but delete contents, so i can us the same sheet again. ... Excel Formula - microsoft.public.excel.worksheet.functions ...I work at a gas station and i am trying to figure out the average cost of fuel in my tank. I have the current volumes and past deliveries set up bel... Partially hidden Excel formula bar - microsoft.public.mac.office ...In Mac OS 10.5, Excel 2008 won't show a complete formula bar. The left side is cut off. I've tried adjusting my display settings, deleting plist fil... Expanded formula bar - microsoft.public.excel.miscOften, I lose track of brackets in long formulas. If I could expand the view in the formula bar it may make it easier to create and edit long formul... Excel Formula Bar Time Display Format - microsoft.public.excel ...How do I get Microsoft Excel to display times on the Formula Bar in 24 hour time with miliseconds? For example, in a spreadsheet cell I have entere... Microsoft Excel Formulas Beginners TutorialThis tutorial is intended for those just getting started with Excel. This tutorial covers basic information about formulas and walks you through creating a simple ... Examples of commonly used formulas - Excel - Office.comSee basic examples of commonly-used Excel formulas. Find links to more advanced examples, including videos and sample workbooks so you can follow along. Excel FormulasFormulas. NOTE: This page is no longer updated. Most of the topics here are now covered on other pages, or have pages of their own. However, I will leave this page ... Excel Formulas - How To Information | eHow.comDon't just sit there scratching your head, find useful info on Excel Formulas on eHow. Get essential tips and learn more about everything from How to Make ... Create a formula - Excel - Office.com - Microsoft Corporation ...Learn techniques for unleashing the power of formulas. Start with basics and work your way up. Learn ways to minimize complexity. 7/23/2012 7:35:20 PM
|
|
|
|
|
|
|
|
|