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
Bookmarks