Forum Discussion
Using form controls
How about an option that doesn't require VBA. Just uses Data Validation for the drop down, and then a simple formula to put the 1 in the appropriate box. Here's the formula I put in cell D3 in the attached (I deleted the macro-dependent rows since this was just a demo):
=IF($B3=D$2,1,0)
That formula, copied to all the other relevant cells, compares the answer selected with the column heading.
I will admit to being biased against macros. There are times when they may be essential, but it's often possible to create a simpler and equally effective solution with Excel's pre-existing functions (and a smaller file to boot).
Thanks mathetes
I'll give that a try. I appreciate your help.
- Riny_van_EekelenAug 14, 2020Platinum Contributor
Andrew_RW I believe the problem you are facing is due to the fact that you have grouped the button objects rather than enclose the option buttons that belong together inside a group box.
In the attached example, I have created two group boxes (also from the Developer ribbon. Buttons 2 and 3 are linked to one cell (C4) and buttons 5 and 6 to another (C14). Buttons 7 to 10 are all linked to H4, but I have grouped buttons 7 and 8 (and then buttons 9 and 10) by selecting them and than right-click and select "Group". This groups the buttons as objects so that you can select, resize, move or format then all at once, but it does not have the same effect as grouping them inside a group box.