LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,182
Default Call subroutine based on combination of Option buttons (two groups)

Wow! Talk about doing things the hard way!! Wouldn't it be a lot
simpler/cleaner/easier to use a formula?

HowTo:
Create 2 local scope Defined Names; 1 for the months col, 1 for the formula
that calcs the average...

-Select A1 on "2016" and open the Define Name dialog
-in the namebox type 2016!ThisMonth
-in the RefersTo box type =$A1
-click the 'Add' button

-in the namebox type 2016!MonthAvg
-in the RefersTo box type =SUMIF(A:A,ThisMonth,C:C)/COUNTIF(A:A,ThisMonth)
-click the 'Add' button

Repeat this for each sheet.

-in colD enter the formula =MonthAvg once for each month you want to avg. (I
put it in D4 and D7 for your sample data, but anywhere in a month's range will
work!)

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Option buttons in two levels groups Jac Tremblay[_4_] Excel Programming 1 October 9th 08 04:38 AM
Accessing groups of option buttons Brotherwarren Excel Programming 4 February 17th 08 08:31 PM
Groups in Option buttons Greg B[_12_] Excel Programming 15 January 24th 08 06:09 PM
Two Groups of Option Buttons on Worksheet Jim May Excel Discussion (Misc queries) 0 June 24th 06 09:34 PM
Option Buttons - groups Ciara Excel Discussion (Misc queries) 4 May 18th 05 05:41 PM


All times are GMT +1. The time now is 11:40 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright 2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"