Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.
Trending News
Creating a macro to add a number to another number?
I want to create a button in Excel with a macro that allows me to add 5 to another number.
So for example, I could click any cell with a value in it, then click the button and 5 would be added to the value in the cell. I've tried various formulas and paste special with no success, so how can I do it?
Cheers, I'll do it now.
1 Answer
- ?Lv 49 years agoFavorite Answer
Sub add5()
If IsNumeric(ActiveCell) Then
ActiveCell = ActiveCell + 5
End If
End Sub
With Excel open, press ALT+F11. Click Insert, then select Module. Paste the above code. Close the VBA window. Right-click on the button and assign the macro to it.