+ Reply to Thread
Results 1 to 4 of 4

VBA to calculate AVERAGEIF and SUMIF for current week/month/year

  1. #1
    Forum Contributor
    Join Date
    10-10-2015
    Location
    the Dysfunctional Empire of Bulgaria
    MS-Off Ver
    2010
    Posts
    102

    VBA to calculate AVERAGEIF and SUMIF for current week/month/year

    As the title says, I want to calculate the average and sum of an array for the CURRENT week, month, and year. (Assume a week runs Monday through Sunday).

    The solution might look something like ???


    Range("A1") = Application.WorksheetFunction.AVERAGEIF(SUM_RANGE, YEAR(DATE_RANGE), YEAR(NOW()))

  2. #2
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    4,661

    Re: VBA to calculate AVERAGEIF and SUMIF for current week/month/year

    Send a short xlsx sample of your data, it will help and make things faster
    - Battle without fear gives no glory - Just try

  3. #3
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    4,661

    Re: VBA to calculate AVERAGEIF and SUMIF for current week/month/year

    Not sure it is what you are looking for but try and comment

    Please Login or Register  to view this content.
    Attached Files Attached Files

  4. #4
    Forum Contributor
    Join Date
    10-10-2015
    Location
    the Dysfunctional Empire of Bulgaria
    MS-Off Ver
    2010
    Posts
    102

    Re: VBA to calculate AVERAGEIF and SUMIF for current week/month/year

    Still working through this, will let you know when I have it done.

    Thanks for the help.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Set PivotTable Filter to Current Day, Current Week, Current Month, or Current Year
    By EnigmaMatter in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-30-2014, 08:31 AM
  2. Calculate Start & End Date & Month for Each Week In Fiscal Year
    By sarndt01 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-22-2014, 02:14 PM
  3. Change year but keep the month the same based on current year
    By Jamon Fries in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-11-2014, 05:29 PM
  4. Return value of the last week of the month based on the year and month
    By stevekho2 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 09-14-2013, 11:04 AM
  5. Replies: 3
    Last Post: 09-04-2013, 10:49 AM
  6. Current Year & Month Name, Previous Year & Month Name
    By mithesh in forum Excel General
    Replies: 9
    Last Post: 10-21-2011, 07:00 AM
  7. Auto insert current month's name and current year
    By Webtekr in forum Word Formatting & General
    Replies: 0
    Last Post: 03-03-2009, 05:20 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1