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
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
Audere est facere
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks