How do I reset the answers on my spreadsheet?

rintelen

Board Regular
Joined
Jul 30, 2006
Messages
96
Okay, I've got a spreadsheet that has a list of 14 questions on it. These are answered by drop down menus (using validation lists). That's not the important matter.

When they've finished this they click a button and it exports the answers to a database record.

Now what I want to do is to allow them to click one button so that it clears all the answers ready for the next customer. How do I do that?

Would prefer to avoid VBA if I can. I can send the sheet to you if you need to look at it.
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
Name your "answer" cells Answer1, Answer2, etc

Put this code at the end of your other code and it will automatically clear these named cells once its done what it needs to do...

Code:
' your other code goes here. Once completed, now clear the following cells

[Answer1].ClearContents
[Answer2].ClearContents
[Answer3].ClearContents
' and so on...
 
Upvote 0
Hi,

If you manually select all of your answer cells you can assign them all to a single name and clear it in one hit. Change the sheet name and range name to suit.

Code:
Sub ClearValues()

    Sheets("My Sheet").Range("MyAnswerRange").ClearContents

End Sub
 
Upvote 0

Forum statistics

Threads
1,214,385
Messages
6,119,208
Members
448,874
Latest member
b1step2far

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