+ Reply to Thread
Results 1 to 2 of 2

Formula to count number of $ bills needed for a certain sum

  1. #1
    Registered User
    Join Date
    12-22-2011
    Location
    New York, NY
    MS-Off Ver
    Excel 2007
    Posts
    1

    Formula to count number of $ bills needed for a certain sum

    I am developing a formula to calculate per diem for traveling employees. Each day they get a certain amount of cash which we need to give them when they arrive wherever they are going. A piece of the spreadsheet needs to be able to express what bills are needed to make the sum. For example if they get $172, how many $100 bills, $50 dollar bills, $20 dollar bills, and so on would be needed to make $172 in cash.

    I can set it up using if statements to determine if a number, such as 100, is found within the sum (172). However in the event that two $100 bills are needed, such as for $202, I cant figure out to to get it to express how many of those numbers can be found in the original number.

    I also have it set up to subtract the previous bill used before determining if the next lowest denomination is needed. However once again the number of them that are needed is something I cannot get expressed.

    I hope this all makes sense and any help you could provide will be much appreciated.

    Thanks

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Formula to count number of $ bills needed for a certain sum

    If you have amount in A3 and denominations in C2:H2 try putting this formula in C3 for number of $100 bills

    =INT($A3/C$2)

    then in D3 copied across

    =INT(($A3-SUMPRODUCT($C$2:C$2,$C3:C3))/D$2)

    See attached with some randomly generated amounts, press F9 to re-generate
    Attached Files Attached Files
    Audere est facere

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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