18.07.2025, 18:15
Hi, I have the following problem and need your help:
I have to create a “smart” questionnaire until mid/end of next week and I am kind of new to the “Macro world”.
I attached a sample excel which I will refer to now:
First topic: Buttons
I want to create a button that can only be klicked, if all yellow highlighted (“mandatory”) cells have an entry (not relevant whether text or value or drowdown choice).
This Button is in almost every tab and should have this functionality always.
After klicking Button 1 (in tab “0_initial questions”):
All “general Q. Topic” tabs (1_ General Q. Topic 1, 3_General Q. Topic 2, etc.) should be unhiding and the person who klicks the button should “jump” to the next tab, in this case “1_ General Q. Topic 1”.
After klicking Button 2 (in tab “1_ General Q. Topic 1”):
The related detailed question tab (in this case “2_ Detailed Q. Topic 1”) should be unhiding and the person who klicks should “jump” to the next tab, in this case “2_ Detailed Q. Topic 1”.
After klicking Button 3 (in tab “2_ Detailed Q. Topic 1”):
The person who klicks should “jump” to the next tab, in this case “2_ Detailed Q. Topic 1”.
After klicking Button 4 (in tab “3_ General Q. Topic 2”):
The related detailed question tab (in this case “4_ Detailed Q. Topic 2”) should be unhiding and the person who klicks should “jump” to the next tab, in this case “4_ Detailed Q. Topic 2”.
So to summarize: at first only the initial questions tab is visible, after filling the mandatory fields and klicking the button, all the general question tabs will show. When filling all mandatory fields in one general question tab and klicking the button, only the corresponding detailed question tab should unhide.
Second topic: unhide rows based on dropdown choice
I think it is easiest to show via an example:
If I am in tab “1_ General Q. Topic 1” and I answer e.g. question 1_Q004 in row 9 in cell F9 with “No”, it should hide the corresponding rows in the detailed question tab, in this case “2_ Detailed Q. Topic 1”, meaning that with answer “no”, the rows 13, 14 and 15 (reference in column B to question 1_Q004) should be hidden and “not available” for answering.
The idea is that when answering questions in the general question tab 5 times with “Yes” and 4 times with “No” and then clicking the button to go to the detailed question tab, only the details for those 5 times answered “Yes” questions should be visible for further answering, since the 4 other questions are not applicable.
It would be really great, if you could help me! I am a bit desperate as mentioned due to the short timeline and my missing knowledge…
I have to create a “smart” questionnaire until mid/end of next week and I am kind of new to the “Macro world”.
I attached a sample excel which I will refer to now:
First topic: Buttons
I want to create a button that can only be klicked, if all yellow highlighted (“mandatory”) cells have an entry (not relevant whether text or value or drowdown choice).
This Button is in almost every tab and should have this functionality always.
After klicking Button 1 (in tab “0_initial questions”):
All “general Q. Topic” tabs (1_ General Q. Topic 1, 3_General Q. Topic 2, etc.) should be unhiding and the person who klicks the button should “jump” to the next tab, in this case “1_ General Q. Topic 1”.
After klicking Button 2 (in tab “1_ General Q. Topic 1”):
The related detailed question tab (in this case “2_ Detailed Q. Topic 1”) should be unhiding and the person who klicks should “jump” to the next tab, in this case “2_ Detailed Q. Topic 1”.
After klicking Button 3 (in tab “2_ Detailed Q. Topic 1”):
The person who klicks should “jump” to the next tab, in this case “2_ Detailed Q. Topic 1”.
After klicking Button 4 (in tab “3_ General Q. Topic 2”):
The related detailed question tab (in this case “4_ Detailed Q. Topic 2”) should be unhiding and the person who klicks should “jump” to the next tab, in this case “4_ Detailed Q. Topic 2”.
So to summarize: at first only the initial questions tab is visible, after filling the mandatory fields and klicking the button, all the general question tabs will show. When filling all mandatory fields in one general question tab and klicking the button, only the corresponding detailed question tab should unhide.
Second topic: unhide rows based on dropdown choice
I think it is easiest to show via an example:
If I am in tab “1_ General Q. Topic 1” and I answer e.g. question 1_Q004 in row 9 in cell F9 with “No”, it should hide the corresponding rows in the detailed question tab, in this case “2_ Detailed Q. Topic 1”, meaning that with answer “no”, the rows 13, 14 and 15 (reference in column B to question 1_Q004) should be hidden and “not available” for answering.
The idea is that when answering questions in the general question tab 5 times with “Yes” and 4 times with “No” and then clicking the button to go to the detailed question tab, only the details for those 5 times answered “Yes” questions should be visible for further answering, since the 4 other questions are not applicable.
It would be really great, if you could help me! I am a bit desperate as mentioned due to the short timeline and my missing knowledge…