#### How to Create a Discount Calculator based on volume

```I am trying to create a cost calculator form, which will automatically
calculate the discounted monthly price for a service based on the
number of units. I want to have a single cell which will calculate the
discount rate based on the number of units.

The discounts are:

if  units =<50  price = 10
if  units =>51 and <101  price = 9.75
if  units =>101 and <201  price = 8.75
if  units =>201 and <301  price = 8.00
if  units =>301 and <401  price = 7.00
if  units =>501 and <501  price = 6.00
if  units =>501  price = 5.00

I have tried to create a module in VBA, and tried to figure out a
formula that would do this -- but failed.  I am neither a programmer
nor an Excel expert, and know when I have ventured too far into terra
incognita.

Anybody know of a solution for this problem?

Thanks

```
 0
8/27/2006 1:33:39 AM
excel 39879 articles. 2 followers.

2 Replies
384 Views

Similar Articles

[PageSpeed] 25

```With number of units in A1,
=VLOOKUP(A1,{0,10;51,9.75;101,8.75;201,8;301,7;401,6;501,5},2,TRUE)
Regards,
Alan.
<wilson.robin@gmail.com> wrote in message
>I am trying to create a cost calculator form, which will automatically
> calculate the discounted monthly price for a service based on the
> number of units. I want to have a single cell which will calculate the
> discount rate based on the number of units.
>
> The discounts are:
>
> if  units =<50  price = 10
> if  units =>51 and <101  price = 9.75
> if  units =>101 and <201  price = 8.75
> if  units =>201 and <301  price = 8.00
> if  units =>301 and <401  price = 7.00
> if  units =>501 and <501  price = 6.00
> if  units =>501  price = 5.00
>
> I have tried to create a module in VBA, and tried to figure out a
> formula that would do this -- but failed.  I am neither a programmer
> nor an Excel expert, and know when I have ventured too far into terra
> incognita.
>
> Anybody know of a solution for this problem?
>
> Thanks
>

```
 0
alan111 (581)
8/27/2006 2:10:56 AM
```A formula

=VLOOKUP(B1,{0,0;1,10;51,9.75;101,8.75;201,8;301,7;401,6;501,5},2)

where the quantity is put in B1

--

Regards,

Peo Sjoblom

Excel 95 - Excel 2007
Northwest Excel Solutions
www.nwexcelsolutions.com
(remove ^^ from email)

<wilson.robin@gmail.com> wrote in message
>I am trying to create a cost calculator form, which will automatically
> calculate the discounted monthly price for a service based on the
> number of units. I want to have a single cell which will calculate the
> discount rate based on the number of units.
>
> The discounts are:
>
> if  units =<50  price = 10
> if  units =>51 and <101  price = 9.75
> if  units =>101 and <201  price = 8.75
> if  units =>201 and <301  price = 8.00
> if  units =>301 and <401  price = 7.00
> if  units =>501 and <501  price = 6.00
> if  units =>501  price = 5.00
>
> I have tried to create a module in VBA, and tried to figure out a
> formula that would do this -- but failed.  I am neither a programmer
> nor an Excel expert, and know when I have ventured too far into terra
> incognita.
>
> Anybody know of a solution for this problem?
>
> Thanks
>

```
 0
Peo
8/27/2006 2:26:43 AM

Similar Artilces:

create a roster
How can you create a weekly roster in which functions can be assigned to more than 10 people. The roster should be updatable, so that when holidays and days off are marked on the weekly roster they will be taken account of it future rosters. ...

importing or creating reference footnotes
I am trying to import a word document into publisher and it has reference footnotes within the document. The reference footnotes are not coming into the publisher document with the reference footnotes. Correct, they will not up to Publisher 2003. In Publisher 2003 depending on which version of Word you are using if they will or not. -- "If you don't know where you are going, any road will take you there!" ...

I'm trying to make a simple task, when a user owner is assigned a task in CRM, it receives an email letting it know it has one. I have the following below, but it is not generating one when i assign one manually in the CRM. What to do? I've tried both the following: When task is created E-Mail to:[owner];Subject test As well as: When task is created if Task activity status = Open then E-Mail to:[owner];Subject test I've checked the mailserver many times over, and I can send emails manually from the CRM so you can rule that out Tested out ok on our end. Some ideas:...

Reference to Knowledge base article 849972
Hi: We are experience this problem very frequently and is creating a problem in our accounting. Some times we are able to enter the invoice and some times not. Please fix this problem as early as possible. Until now in Great Plains 8 service pack 4a this fix is not availabe. ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you do not see the button, follow this link to open the suggestion in the Microsoft Web-based Newsrea...

using CList as a base class in an extension DLL
Hi all. I must be doing something wrong but cannot figure it out. I have a data class and a list class, in an extension DLL, declared like this: >#define DllExport __declspec (dllexport) >class DllExport CRate : public CObject { >public: > DECLARE_SERIAL (CRate) > CRate () { m_Rate = 0; } > CRate (const CRate &in) { *this = in; } > > const CRate& operator= (const CRate& in) > { m_Rate = in.m_Rate; m_Date = in.m_Date; return *this; } > > bool operator== (const CRate& in); > bool operator!= (const CRate& i...

Mailbox not created when AD account created
A couple of days ago I noticed that I created a user account but the 'Email Addresses' tab of the user properies did not list any email addresses. Subsequent new user accounts have all experienced the same. I researched the knowledge and tried the recommended solutions to either manaully start the recipient update service or rebuild te recipient update service. Neither recommendation has resulted in a mailbox being created for this particular user or any additional user that I have created since this error first showed up. I performed a Windows update last Thursday and so I bel...

Help Creating XmlNode / XmlAttribute Elegantly
I am creating a configuration class to read / write a standard configuration file. <?xml version="1.0" encoding="utf-8"?> <configuration> <appSettings> <add key="ConnectionString" value="server=(local);" /> </appSettings> </configuration> I am using a XmlDocument for my base implementation. I am looking to see if there is a better way to add a new node / attribute than using XmlDocument.InnerXml. I would consider this to be a hack but couldn't really see another way of doing this without definin...

Create external database
Hi all. I need to create an external database (file). On a site I found this code: ------------------------------------------------------ Function CreateLinkedExternalTable(strTargetDB As String, strProviderString As String, strSourceTbl As String, strLinkTblName As String) As String 'strTargetDB = Source Database Name 'strProviderString = Not used, currently hard coded 'strSourceTbl = Source Table name in the database we are linking too. 'strLinkTblName = Table name we would like to see in the Access Database. Dim catDB As ADOX.Catalog Dim tblLink As...

How to create pie chart with %
I have got a problem that I don't if excel could help me to calculate the % within a column and draw a pie chart. My case is I have a column containing a series of numbers. e.g. 1,4,8,1,3,9,11,2,4,5,6,.........etc I want to draw a pie chart that showing 1-3 , 4-6, 7-9, >9 with the corresponding % inside that column. Can anyone tell me how can I make it ? Ray - You need to calculate the frequencies in your data. Let's assume your data is in A1:A12. In B1:B3 enter these numbers, the upper limits on the groupings: 3 6 9 You can enter ">9" into B4 witho...

How do I sort by calculated field
relationship = one buyer to many purchases. Report is summary of buyer purchases. Number of purchases and total purchased. The number of purchases is calculated "=Count([Lot Info]![Lot No])" , the total purchase is calculated "=Sum([Price])" How can I make the report sort by descending total purchases? By descending total lots? To get the information to report one total line sorting and grouping is set to group by buyer number, group ascending. group on each value, interval =1, keep together = whole group. Presumably the sum of price is in a group footer, so...

Email address not created when a new user is created
All, This issue recently happened in my company. Upon creating a new user, the policy was set to create the smtp and X400 address automaticaly. Now when we create a user the smtp and x400 addresses are not created, and when attempting to setup the new user in outlook, the address cant be found. We are using exchange 2003 SP1 on Win2k3 servers. On Wed, 13 Jul 2005 06:49:07 -0700, "Bryan" <Bryan@discussions.microsoft.com> wrote: >All, >This issue recently happened in my company. Upon creating a new user, the >policy was set to create the smtp and X400 addres...

Exchange 2010 MRM, no log files being created
I'm hoping someone can help me with this issue....it has been driving me crazy for days. I have enabled MRM logging on our exchange server, and I can see that some of the policies are working when I run start-managedfolderassistant. We have a retention policy tag on the deleteditems folder, and this does work. The problem is I am not getting any files in the MRM log directory. C:\Program Files\Microsoft\Exchange Server\V14\Logging\Managed Folder Assistant Events 9021 and 9022 are logged in the Application log, but where are the files? Below is the output of my mai...

when form created
I have a form which was created by someone else (not a form template) which is like a questionnaire with empty boxes to be completed. When the boxes are typed in all the margins move to accommodate the words being typed. Is there a way to fix/lock the original form and then just fill in the blank boxes? I suspect this is set up as a table with auto resizing enabled. Displaying table gridlines (Table | Show Gridlines) will help you see what you're dealing with. Then select the table, go to the Table tab of Table Properties, click Options, and clear the check box for "A...

Creating a Brochure
How do you create a 3-column brochure from scratch for Publisher 2002? I can only find the directions for the 2003 version. Quick help would be appreciated, project is due Monday. Create a three-panel or four-panel folded publication http://office.microsoft.com/en-us/assistance/HP011646681033.aspx Scroll down to the section that says "Build a three-panel or four-panel publications from scratch." -- Mary Sauer MSFT MVP http://office.microsoft.com/ http://msauer.mvps.org/ news://msnews.microsoft.com "Derek" <Derek@discussions.microsoft.com> wrote in message news...

How to create Access macro shortcut
I'm still using Access 97 and saw something the other day that I would like to use that was in Access 2000. In an Access 2000 database, there was a .mam file in a directory that launched the Access 2000 program and ran a macro. How do you set this up? Can it be done in Access 97? If so, how? Hi. > How do you set this up? Select the macro in the Database Window and right click with your mouse, then select "Create Shortcut..." in the pop-up menu. Follow the prompts for where to place the shortcut and what to name it. The default is: <PathToDeskTopDir>\Shortcut ...

Excel's Calculating Sequence
If I have a block of formulae , say, in A1:E10 and hit F9 is thare any particular sequence that the recalc is done ? e.g. by rows first and then columns etc. TIA Bill From the Help file: When are existing formulas recalculated? Excel recalculates those cells that are dependent on other cells that contain changed values. This type of calculation helps to avoid unnecessary calculations. Excel also calculates workbooks each time they are opened. Background calculation As calculation proceeds, you can choose commands or perform actions such as entering numbers or formulas. Excel tempor...

Users mailboxes not created when user created
I have a problem that recently just started happening on my exchange 2003 server. When i create a new user account and create the mailbox for exchange, once im done, the mailbox isnt created, adn if you go into the properties of the user account adn go to the exchange email address tab, there isnt an smtp or an x.400 address listed. I am having to manually create and add these, adn then go delete the exchange mailbox and recreate it. This is really annoying and would love to know if anyone has any ideas of how to fix it. Thanks Jason In news:9F836A43-98BF-435A-AA43-AFF10124BE3F@micro...

CRM should let me create custom fields in batch
Hi, With MS CRM v3.0, when we have a group of fields to create, it would be faster to be able to enter the list and then submit the list for processing. Thank you. Felix. ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you do not see the button, follow this link to open the suggestion in the Microsoft Web-based Newsreader and then click "I Agree" in the message pane. http://www.microsoft.com/Businesssolutions/C...

How do I divide a page into equal sections (halves, qarters, eights)? I need to scan and type ads and coupons into this booklet. New at this. After managing to set up OE-QuoteFix on his new PC, Ed reads a message from FRSH <anonymous@discussions.microsoft.com>... > How do I divide a page into equal sections (halves, qarters, eights)? Arrange > Layout Guides > Grid Guides -- Ed Bennett - MVP Microsoft Publisher http://www.mvps.org/the_nerd/ Before reading this message, view the disclaimer: http://mvps.org/the_nerd/disclaim.htm ...

Changing the volume of 2 sound files on the same slides
Hello all, I have background music playing on my PPT while I'm speaking. I would like to know how can I adjust the volume to on the background music to play softly underneath my voice. Thanks in advance! Geo I see you have posted a couple of times on this. The only method I have been able to use is Audacity, a FREE and quite comprehensive sound utility. Put your music (and voice, if you wish) into Audacity and alter the volumes to suit you needs, then export the file as a wav file for use in PowerPoint. You will need to spend a little time playing with Audacity t...

Update field w/ string based on service due dates
Hi, I have a form that provides a listing of various instruments that are serviced on a monthly to annual basis, with general info about the instrument, last and next service dates, etc.. What I am trying to do is create an On Open event procedure that will identify all instruments that are listed with a string of either "Past Due" or "Schedule Vendor" based on whether each of their respective 'Due' dates have already transpired or not from the current month. The code I initially created for this was as follows: Private Sub Form_Open() Dim myDate, myDue myD...

Smartlist builder calculated field problem
I am trying to build a smartlist with a calculated field that contains the number of hours and minutes until a service call expires. The user defined 1 field is the date and time in smalldate format that shows when the call expires. I need to have it so that the field displays the hours / minutes until this time is reached. I currently have the following in the : DATEDIFF ( hh , GETDATE() , {Service Call Master:User Defined 1} ) this returns absolutly nothing when I add the columns to the smart list. The field description in great plains tells me that the user defined field is a stri...

Counting entries in column C, based on entries in column A
I would like to count the # of entries of a value in column C, grouped by values in column A. Binder Note Category AA01 abc 2 AA01 ccc 2 AA01 abc 2 AA01 ddd 3 AA22 aaa 1 AA22 ccc 2 Need to find the # of Category 2's , for every Binder # Do not have the nested IF's I have tried available at the moment, but I am getting close... Try this: E1 = some binder code like AA01 E2 = some category number like 2 =SUMPRODUCT(--(A2:A7=E1),--(C2:C7=E2)) Biff <xj6rob@hotmail....

Access unable to create an MDE
I am getting this message when I try to make an MDE: "Access unable to create an MDE database" No error mesages or any other info is displayed. I haven't had this trouble before. Then I added a form, a couple reports, an create table query, modified a toolbar and added a module. Now I am getting this message. This database is a front end of a project with several linked table to a back end. Any suggestions? Thanks Jeff G Try compiling your application (under the Debug menu when you're in the VB Editor). Often an application will have some error that doesn't m...

Report based on a record
How can I make a report, when it's opened, ask for user input? I need to have the user select a name from a list & report on that name's record. Is this done in the query for the report or the report itself? Thank You Don I almost always open a form first that has a control for the user to select or enter the criteria value(s). Then I add a button to open the report. There is sample code for this at http://www.mvps.org/access/reports/rpt0002.htm. -- Duane Hookom Microsoft Access MVP "blanch2010" wrote: > How can I make a report, when it...