Resetting data validation questions to the default of blank.

EMBBerwyn

New Member
Joined
Jun 8, 2022
Messages
3
Office Version
  1. 365
Platform
  1. Windows
I'm creating a health questionnaire for students some of whom are veterans. I've created a little form to help identify their health insurance coverage and next of kin. A copy of which has been uploaded.

The questionnaire starts with the query "Do you have health/medical insurance?"

If the answer is "Yes", a series of questions will be displayed. For each question there is a data validation list of possible answers. Other than Medicare answers are either "Yes" or "No."

Frequently, students and many others are unsure of their health insurance. They may answer incorrectly and later wish to correct their answers. For example, a veteran may believe that Tricare is their primary health insurance. However, by law Tricare only covers approved medical claims after all other insurance claims have been paid. Hence, they may wish to change their answer to the question "Is Tricare your primary health insurance?" from "Yes" to "No'."

However, some students start over with the first question, "Do you have health/medical insurance?" In that event all the data validation questions must return to the default answer which is a blank. I have written some code that hides all the questions and returns the answers to all questions to the default blank when the answer to the first question is changed to "No."

However, if they change their minds and click on "Yes" or "-" after selecting "No", all their previous answers appear in the data validation cells.

I need to reset all data validation cells to blank if they change their answer to the first question.

I've tried a couple different Sub routines but when executed they were "$#^^^&^"

I've uploaded a workbook "Student Health Insurance."

Any suggestions would be deeply appreciated.


Health Insurance Providers
Do you have health/medical insurance?



Parts A and Part B

Yes
Is Tricare you primary health insurance? Yes

Yes


Yes





Private Sub Worksheet_Change(ByVal Target As Range)
If ("$B$2") = "No" Then
Range("$B$6") = ""
Range("$B$8") = ""
Range("$B$9") = ""
Range("$B$11") = ""
End If

End Sub
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!

Forum statistics

Threads
1,224,825
Messages
6,181,190
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

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