+ Reply to Thread
Results 1 to 17 of 17

Formula for counting rain days of the year, month, and or week

Hybrid View

  1. #1
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,053

    Re: Formula for counting rain days of the year, month, and or week

    See if this works for you...
    G6=COUNTIFS(C:C,">0",A:A,">="&DATE(F6,1,1),A:A,"<="&DATE(F6,12,31))
    I6=COUNTIFS(C:C,">0",A:A,">="&DATEVALUE(1&H6),A:A,"<"&EDATE(DATEVALUE(1&H6),1))
    for the week num, I used a helper that you can hide if needed...
    D3=WEEKNUM(A3)&", "&YEAR(A3)
    copied down

    then I changed J6 etc to just 1, 2015
    K6=COUNTIFS(C:C,">0",D:D,J6)
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  2. #2
    Forum Contributor
    Join Date
    03-22-2016
    Location
    Philippines
    MS-Off Ver
    MS Office 2013
    Posts
    124

    Re: Formula for counting rain days of the year, month, and or week

    Quote Originally Posted by FDibbins View Post
    See if this works for you...
    G6=COUNTIFS(C:C,">0",A:A,">="&DATE(F6,1,1),A:A,"<="&DATE(F6,12,31))
    I6=COUNTIFS(C:C,">0",A:A,">="&DATEVALUE(1&H6),A:A,"<"&EDATE(DATEVALUE(1&H6),1))
    for the week num, I used a helper that you can hide if needed...
    D3=WEEKNUM(A3)&", "&YEAR(A3)
    copied down

    then I changed J6 etc to just 1, 2015
    K6=COUNTIFS(C:C,">0",D:D,J6)
    Hi FDibbins,

    It is not counting as days. I think it is counting the 30mins interval of the data not days.

    for years, it is counting more than 365 days, for the month it is counting more than 31, and for the week more than 7.

    Regards,
    Dean

+ 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] Calculate Week Range from Week Number, Month and Year?
    By A108A108 in forum Excel Formulas & Functions
    Replies: 16
    Last Post: 05-07-2016, 03:11 PM
  2. This time last week, last month, last year.
    By sungen99 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-08-2015, 02:13 PM
  3. find time left in month.days unit between two dates(in YEAR.MONTH.DAY)
    By xcfeng95 in forum Excel Formulas & Functions
    Replies: 16
    Last Post: 02-21-2014, 12:55 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. Days since last rain
    By ejaeschk in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-20-2013, 10:57 AM
  6. [SOLVED] Need a formula that picks up the date for Monday for each week from a given month and year
    By davisfs2007 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-11-2013, 02:21 PM
  7. Adding sort by week, month and year to existing formula
    By Throtmorton P. in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-22-2012, 06:41 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