Button to change a yes value to no

Eric Livesay

Board Regular
Joined
Feb 13, 2008
Messages
127
Hey all. I have a bill tracker sheet that has a column for "Paid". I have a drop down list for Yes or No. I would like to be able to have a button at the top of the column that changes all the yes's to no's so I can start over for next months bills.

Thanks in advance!
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
Try the code below, change the range to suit
VBA Code:
Sub Livesay()
    Range("A2:A20").Replace "Yes", "No", xlWhole
End Sub
 
Upvote 1
Solution
Since your cells only contain either "Yes" or "No", just assign "No" to the entire range no matter what is currently in there...

Range("A2:A20").Value = "No"
 
Upvote 0

Forum statistics

Threads
1,215,174
Messages
6,123,454
Members
449,100
Latest member
sktz

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