Increment using a button in excel

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How do I create a button in Excel 2002 that will increment the value in an
active cell by negative 1? I have about 200 cells where I continually update
the values usually decreasing the value by 1, 2, 3, 4 or 5 and being able to
update the active cell with one buttion would be a real time saver.
 
I have Excel 2003 but expect the process is the same.

1. Add the command button using that option on the Control Toolbox toolbar.
I recommend adding this toolbar if not already there (via Tools/Customize).
2. Right click on the button you just created and select View Code.
3. The first and last line of the macro will already be in place when Excel
shows you the code. Between these two put the instruction "Selection.Value =
Selection.Value-1". Close down the VBA window.
4. If you want to change any of the button characteristics (e.g. it's
caption) you can do it via the Properties window (right click on the button
and select Properties).
5. Get out of Design Mode using the Design Mode button on the Control
Toolbox toolbar (it looks like a triangle and pencil).
6. Try it out (i.e. select a cell and click the button.

Hope this helps.
Will
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top