MrExcel Publishing
Your One Stop for Excel Tips & Solutions

Option Buttons

Posted by Robin on May 25, 2001 8:21 AM

I have inserted two pairs of option buttons and would like them to operate independently. When I change the cell link for the first pair, the link for the other pair is changed as well. Is there a way (without having to do this via VBA) to remedy this?


Posted by Robin on May 25, 2001 8:26 AM

Figured it out

In case anyone else is interested, the solution is to group each pair in a frame.


Posted by Tom on May 25, 2001 11:37 AM


How do i count the number of rows after i do an advanced filter?? i have a huge report with several filters and new to know how many rows show up after each filter runs. "post a message" wouldnt work so i used this.

Posted by Dave Hawley on May 25, 2001 5:35 PM

Re: Figured it out

Hi Robin

If you use the OptionButtons from the "Control Toolbox" you could change the "GroupName" Property of each OptionButton to a different name.


OzGrid Business Applications

Posted by Dax on May 26, 2001 9:06 AM



When you run an advanced filter Excel tells you how many items matched the criteria in the status bar. However, this disappears if you edit a cell for example. This code will tell you the same. To use it, click Alt+F11 to open the VB Editor, click Insert, Module and then paste the code. You can then run the macro by clicking Alt+F8 and choosing CountFilteredRows. Obviously, this may become a pain after a while so you could include this routine in your personal workbook and assign it to a button or menu option.

Sub CountFilteredRows()
Dim VisibleCellCount As Long

With ActiveCell.CurrentRegion.SpecialCells(xlCellTypeVisible)
VisibleCellCount = (.Count / .Columns.Count) - 1
End With

MsgBox "There are " & VisibleCellCount & _
" items that meet the advanced filter criteria", _
vbInformation, "Filtered Item Count"
End Sub