Simple clear advice in plain English

Calculate a customer's change in cash

Use Excel to ensure your customers aren’t short-changed

Reader Dan Cutforth wrote in to say: “I would like a spreadsheet that calculates the most efficient combination of notes and coins to make up an entered cash amount. Ideally the amount would be selected with a spinner, though I’m using Excel 2007 and the old controls on a Forms toolbar don’t appear to be available.”

The latest version of Excel doesn’t offer such design facilities by default. But they are easy to add. Click the Office icon and then the Excel Options button. Choose Popular and under Top Options you’ll find a box you can check next to, Show Developer tab in the Ribbon.

Open a new workbook. Click the now visible Developer tab. Click the Insert icon in the Control section. From the now-displayed Form Controls box pick the spinner.

In versions prior to Excel 2007 you just display the Forms toolbar and click on the spinner icon. In all versions, a small cross appears. Draw a rectangle over the cell where you want the spinner to be. Right-click on the spinner and choose Format Control.

In the Format Object dialogue box, under the Control tab, you can enter the starting value, the minimum amount that can be chosen and the maximum amount.

The incremental change amount you want is 1, which is the default. Enter the address of any cell that’s out of the way to be the link cell.

Under the Properties tab of this dialogue box you can choose whether the spinner is to be sized and moved with the cell or not, and if the spinner is to be shown on printouts or not.

Enter the address of the link cell in a cell above or beside the spinner. Divide by 100 so the coins can be calculated in pennies; in other words, if the link cell is B15 enter: =B15/100 in this cell.

The formula in the link cell may be displayed, but you could format it using a white font on white background to hide it.

To follow our example enter the note and coin denominations in column C starting with cell C3. All you have to do now is enter three variations of a short formula that will calculate how many of each note and coin is needed to make up the selected amount.

If the selected amount appears in cell B1, in cell D3 enter: =TRUNC($B$1/C3,0)

In cell D4 enter: =TRUNC(($B$1-SUM($E$3:E3))/C4,0)

Point to the Fill Handle in the lower-right of cell D4 and drag down to cell D13. The second argument of the TRUNC function is a number specifying the precision of the truncation. For calculating the single pennies this argument needs to be increased so in cell D14 enter:
=TRUNC(($B$1-SUM($E$3:E13))/C14,1)

Reader Comments

   

Add your comment

All fields must be completed. Your email address will not be displayed or used to send marketing messages.

All messages will be checked by moderators before appearing on the site.

See our Privacy Policy for more information.

Related articles

Remove toolbars from webbrowser screenshot

How do I delete the toolbars I don't want from my web browser?

Some toolbars are installed when you load new software and are annoying if you don't want or need them. We explain how to disable or remove them

Extensions for Open Office Writer

Use Open Office Writer as a free alternative to Microsoft Word

Open Office Writer is a great piece of software that has hundreds of features. Here we show you 10 lesser-known features that you might not have discovered yet

Editing a song in Hit 'n' Mix

Hit'n'Mix music-editing software

An innovative music program that lets you experiment with your favourite songs

Question & Answer

Q.How do I store musician and other information about...

> Read the answer

Q.Why can't my browser find the website address I typed...

> Read the answer

Q.All updates have been downloaded, so why won't Windows...

> Read the answer

Best deals on the web

img

Apple MacBook Pro (MC724LL/A)

£999.99- Buy it now

img

Sony Vaio VPCF23P1E/B

£679.98- Buy it now

img

Sony Vaio VPCEH1J1E/W

£349.99- Buy it now

Great benefits for subscribers!

Poll

Which is your preferred web browser

Jargon Buster

Computing terms explained in plain English

Bittorrent

A technology for downloading files. Allows even very large files to be downloaded quickly.

Great shopping deals from Computeractive