Help needed - macro button that increases/decreases specific value to a range of cells

Status
Not open for further replies.

Cuzzaa

Board Regular
Joined
Apr 30, 2019
Messages
86
Hi everyone,

Hope you can help.

Is anyone able to help me with some vba for a macro button then when clicked presents the user with a popup to either increase or decrease (add or minus) and then a second user input field to enter a number, i.e. the user clicks the button, then is asked to select either 'Increase' or 'Decrease' and then asked to enter a value i.e. '10' so that the values in cell range 'H1:H100' are all increased by 10?

Please let me know if there's any other info you need if this isn't clear?

Thank you SO much!
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
I can use something similar to the below but how can I amend this so that the user is prompted to select either increase or decrease and a value to each of the cells in the range?

VBA Code:
Private Sub CommandButton1_Click()
Range("H1:H100").Value = Range("A1").Value + 1
End Sub
 
Upvote 0
Status
Not open for further replies.

Forum statistics

Threads
1,214,861
Messages
6,121,969
Members
449,059
Latest member
oculus

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