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.
 

Some videos you may like

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.

DauntingGecko

Well-known Member
Joined
Feb 2, 2006
Messages
521
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...
 

Mike Blackman

Well-known Member
Joined
Jun 8, 2007
Messages
2,494
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
 

Watch MrExcel Video

Forum statistics

Threads
1,122,335
Messages
5,595,573
Members
413,996
Latest member
mabelO

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
Top