Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
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. |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
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. |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
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. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
how to increment a value by 1 everytime excel is closed? | Excel Discussion (Misc queries) | |||
Excel formula to increment the month by 2? | Excel Worksheet Functions | |||
increment invoice numbers in excel | Excel Discussion (Misc queries) | |||
Set Increment on Spin Button to 0.1 | Excel Discussion (Misc queries) | |||
Increment a counter in Excel | Excel Worksheet Functions |