Showing posts with label option. Show all posts
Showing posts with label option. Show all posts

Friday, March 4, 2016

How to highlight an option button in EXCEL when it is selected by the user (no macro needed)

If you want to highlight the selected option button for your custom form in EXCEL, first set the background of the option button as "Transparent": Right click on the option button > "Format Control..." then on tab "Colors and Lines, put the "Transparency" level at 100% and press "OK":


Then if the result of your option button appear in cell "A5" for example (see previous post here to see how to do) then in cell A1 and A2 (behind the option buttons), enter respectivelly the following formulas:

"=if(A5=1,"color","")"
"=if(A5=2,"color","")"



Finally, create a conditional format to color the cell when the value of the cell is equal to "color". 
Trick to not show the formula: put the default font color of A1 and A2 as white and in the conditional formating options, set the font color to be same as the cell background color when the value is equal to "color".




As a result, the option button will be highlighted once the user select it:


Created by DoMyExcel.com © | Excel & VBA Consulting | Customized Excel Solutions starting at 29 USD
Services provided to Individuals and Businesses | Free Quote: DoMyExcel@gmail.com

How to make professional forms in EXCEL using option buttons without creating any Macro

If you want to make user forms in EXCEL without making any code in VBA, you can use the "Form controls" located in the "Insert" dropdown menu of the developer ribbon:


For example if you want to retrieve the value of  your option buttons, select one of the option button of the group, click in the formula field and select the target cell. In this example, it will write "1" in cell "A5" if the option button 1 is selected and 2 if the option button 2 is selected:




Created by DoMyExcel.com © | Excel & VBA Consulting | Customized Excel Solutions starting at 29 USD
Services provided to Individuals and Businesses | Free Quote: DoMyExcel@gmail.com