Macro to increment cell by one

duskwood47

New Member
Joined
Oct 9, 2017
Messages
28
So I need to create a macro that will increment the cell immedietly to the right of the cell that would have a button to increment by one. I know I could a simple

Public Sub AddOne()
Range("C3").Value = Range("C3") + 1
End Sub

to accomplish what I need however I will have around 10 buttons total and dont want a different macro for each one.

Help please!
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
You don't even need a macro. You could just insert a Spin button.

If you do not have the Developer tab on your ribbon, click File > Options > Customize Ribbon > and under the Main Tabs box on the right, check Developer.

Select the cell where you want the button, say C2. Now from the Developer tab, click Insert > Form Controls > Spin Button. Use the mouse to create the spin button on the sheet where you want it. Now right click on the spin button and select Format Control. Change minimum value to 1. Change the Cell link to C3 (or wherever you put the counter). Click OK.

Now you can click on the spin button, up or down, and it will increment C3 appropriately.
 
Upvote 0
You don't even need a macro. You could just insert a Spin button.

If you do not have the Developer tab on your ribbon, click File > Options > Customize Ribbon > and under the Main Tabs box on the right, check Developer.

Select the cell where you want the button, say C2. Now from the Developer tab, click Insert > Form Controls > Spin Button. Use the mouse to create the spin button on the sheet where you want it. Now right click on the spin button and select Format Control. Change minimum value to 1. Change the Cell link to C3 (or wherever you put the counter). Click OK.

Now you can click on the spin button, up or down, and it will increment C3 appropriately.
You don't even need a macro. You could just insert a Spin button.

If you do not have the Developer tab on your ribbon, click File > Options > Customize Ribbon > and under the Main Tabs box on the right, check Developer.

Select the cell where you want the button, say C2. Now from the Developer tab, click Insert > Form Controls > Spin Button. Use the mouse to create the spin button on the sheet where you want it. Now right click on the spin button and select Format Control. Change minimum value to 1. Change the Cell link to C3 (or wherever you put the counter). Click OK.

Now you can click on the spin button, up or down, and it will increment C3 appropriately.
 
Upvote 0
Just to let you know that it was extremely useful to me today. Thanks a lot.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,170
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top