![]() |
Increment using a button in excel
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. |
Increment using a button in excel
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 "Chuck P." wrote: 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. |
Increment using a button in excel
That worked just fine.
Thank You very much Chuck "roadkill" wrote: 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 "Chuck P." wrote: 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. |
All times are GMT +1. The time now is 11:54 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com