Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > microsoft.public.excel.programming > #109983

Re: Call subroutine based on combination of Option buttons (two groups)

From GS <gs@v.invalid>
Newsgroups microsoft.public.excel.programming
Subject Re: Call subroutine based on combination of Option buttons (two groups)
Date 2017-04-10 06:07 -0400
Organization A noiseless patient Spider
Message-ID <ocflb2$dhv$1@dont-email.me> (permalink)
References <a6aae7eb-0451-488a-9088-610b590242ea@googlegroups.com>

Show all headers | View raw


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

Back to microsoft.public.excel.programming | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Call subroutine based on combination of Option buttons (two groups) Robert Logan <robert.logan.montana@gmail.com> - 2017-04-09 12:44 -0700
  Re: Call subroutine based on combination of Option buttons (two groups) GS <gs@v.invalid> - 2017-04-10 06:07 -0400
  Re: Call subroutine based on combination of Option buttons (two groups) cacuoc334465c <cacu123oc365a@gmail.com> - 2017-04-10 17:36 +0100
  Re: Call subroutine based on combination of Option buttons (two groups) Robert Logan <robert.logan.montana@gmail.com> - 2017-04-10 13:36 -0700
    Re: Call subroutine based on combination of Option buttons (two groups) GS <gs@v.invalid> - 2017-04-10 19:16 -0400
  Re: Call subroutine based on combination of Option buttons (two groups) cacuoc334465c <cacu123oc365a@gmail.com> - 2017-04-10 21:37 +0100
  Re: Call subroutine based on combination of Option buttons (two groups) cacuoc334465c <cacu123oc365a@gmail.com> - 2017-04-11 00:35 +0100
  Re: Call subroutine based on combination of Option buttons (two groups) cacuoc334465c <cacu123oc365a@gmail.com> - 2017-04-11 13:36 +0100
  Re: Call subroutine based on combination of Option buttons (two groups) cacuoc334465c <cacu123oc365a@gmail.com> - 2017-04-11 18:36 +0100
  Re: Call subroutine based on combination of Option buttons (two groups) cacuoc334465c <cacu123oc365a@gmail.com> - 2017-04-11 19:37 +0100
  Re: Call subroutine based on combination of Option buttons (two groups) Robert Logan <robert.logan.montana@gmail.com> - 2017-04-11 15:02 -0700
    Re: Call subroutine based on combination of Option buttons (two groups) GS <gs@v.invalid> - 2017-04-11 18:04 -0400
  Re: Call subroutine based on combination of Option buttons (two groups) cacuoc334465c <cacu123oc365a@gmail.com> - 2017-04-12 19:10 +0100
  Re: Call subroutine based on combination of Option buttons (two groups) cacuoc334465c <cacu123oc365a@gmail.com> - 2017-04-12 20:11 +0100

csiph-web