• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Resetting a Data Validation Drop-Down with a Recorded Macro

rsomist

Member
Hello! I have a worksheet I'm trying to reset back to zeros with a recorded macro - I don't write VBA code, so not sure this is even possible. I have been able to reset the worksheet in all cells except for the ones with dropdowns, which I'm trying to get back to "Select %" (cells B4 and E13). Is this possible with a recorded macro? Attaching my test worksheet for reference.
 

Attachments

  • TEST EXCEL DOC_JB.xlsm
    21.7 KB · Views: 8
This should do the job.
Code:
Sub Reset_Worksheet()
' Keyboard Shortcut: Ctrl+Shift+C
    Range("B5:B9,B13,E17:E18,E20").Value = 0
    Range("B4,E13").Value = "Select %"
End Sub
I also changed a few things in your sheet.
E13 cell property = percentage
G13 formula is
Code:
=IFERROR(SUM(B13*E13),"")
In sheet 2 you will find a defined name range with the percentages of E13
 

Attachments

  • DOC_JB-1.xlsm
    19.1 KB · Views: 3
Back
Top