+ Reply to Thread
Results 1 to 3 of 3

Looking for Excel Function to calculate amount owed

  1. #1
    Registered User
    Join Date
    10-07-2008
    Location
    Colorado
    Posts
    4

    Looking for Excel Function to calculate amount owed

    I can only imagine that there is something that I'm missing. Basically what happens is we start the kids off with two cards to sell. The cards sell for $15 and for each card that they sell they get $5 off of their equipment fee. If they don't sell any cards then they must return them and if they don't return them then they owe us for the cards. Now from my limited programming knowledge it sounds like I need some if/and/then statements but I'm not sure how that works with excel. Let me show a few example of what might happen to help clarify...

    Bob returns 2 cards, sold 0 and therefore owes $55.

    Tom returned 0 cards, sold $60 worth of cards and therefore owes $35.

    Bill returned 0 cards, sold $30 worth of cards and therefore owes $45.

    Jack returned 1 card, sold $15 worth of cards and therefore owes $50.

    Dan returned 0 cards, sold 0 cards and therefore owes $85.

    Does that make sense? I think that should show all the different possibilities. I could figure out an equation if they sold cards, or if they didn't sell any or return any but I don't know how to make it switch equations if they sold cards and didn't return any. It seems like I need a way to make a peacewise function or something.
    Last edited by BlackMagic21; 10-07-2008 at 04:41 PM.

  2. #2
    Registered User
    Join Date
    10-07-2008
    Location
    Colorado
    Posts
    4
    piecewise function, I mean.

  3. #3
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,885
    Hi BlackMagic, and welcome to the forum. Please take a moment to read the forum rules, then amend your thread title to something more descriptive of your issue.

    As for your problem, we may be able to solve it like this:
    Please Login or Register  to view this content.
    This gave me the same results as you expected in your example. Hopefully that helps!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. given loan amount, emi and tenure, how to calculate interest rate?
    By Ravi Parsi in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-08-2008, 11:20 PM
  2. Replies: 2
    Last Post: 04-06-2008, 07:04 PM
  3. Function and Personal.xls
    By boylejob in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-02-2007, 12:32 PM
  4. Pmt Function
    By grahowler in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 12-22-2006, 12:00 AM
  5. BRILLIANT EXCEL ADD-IN IDEA - Requires Calling a DLL Function Written In C
    By studaq in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-20-2006, 05:29 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1