Macro to increase/decrease

scotball

Active Member
Joined
Oct 23, 2008
Messages
375
Hi,

Looking for a macro that I can assign to a button which, when clicked, will add 1 to a value in a cell. So if B2=5 when I click the button, this increments by 1 thus B2=6.

Thanks
Lee
 

Some videos you may like

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
40,629
Office Version
365
Platform
Windows
Try
Code:
Sub MyButton()
   Range("B2").Value = Range("B2").Value + 1
End Sub
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
40,629
Office Version
365
Platform
Windows
You're welcome
 

Watch MrExcel Video

Forum statistics

Threads
1,099,045
Messages
5,466,222
Members
406,473
Latest member
Dunno123

This Week's Hot Topics

Top