+ Reply to Thread
Results 1 to 6 of 6

Excel Formula using dates

  1. #1
    Registered User
    Join Date
    06-29-2016
    Location
    Tampa, Florida
    MS-Off Ver
    MS365(PC) Version2210
    Posts
    10

    Excel Formula using dates

    Hello,

    I'm new to the forum. I am trying to develop a formula that will calculate the number of incidents in a column i.e =sum(J5:J18) but if an incident occurred more than 6 months ago I do not want it factored into the equation. Is there a formula this type of example?

    Thank you
    Dan Zdrodowski

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,822

    Re: Excel Formula using dates

    Yes, you can use SUMIFS for this. Assume you have dates in column D, then you could have:

    =SUMIFS(J:J,D:D,"<="&TODAY(),D:D,">="&DATE(YEAR(TODAY()),MONTH(TODAY())-6,DAY(TODAY())))

    which will compare the dates with today's date and only include those within the last six months.

    Hope this helps.

    Pete

  3. #3
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2406 Win 11 Home 64 Bit
    Posts
    23,959

    Re: Excel Formula using dates

    Look at this link on SumIfs

    http://www.techonthenet.com/excel/formulas/sumifs.php
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  4. #4
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,631

    Re: Excel Formula using dates

    What's in column J? Are they incident dates or some quantity per date. To count incidents only maybe:
    Please Login or Register  to view this content.
    Ben Van Johnson

  5. #5
    Registered User
    Join Date
    06-29-2016
    Location
    Tampa, Florida
    MS-Off Ver
    MS365(PC) Version2210
    Posts
    10

    Re: Excel Formula using dates

    Thank you everyone. Pete_UK, that worked perfectly.

    Dan

  6. #6
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2021
    Posts
    5,933

    Re: Excel Formula using dates

    A little shorter ...

    =SUMIFS(J:J,D:D,"<="&TODAY(),D:D,">="&EDATE(TODAY(),-6))

+ 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] Excel formula to produce dates
    By davidx in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-23-2013, 05:33 AM
  2. [SOLVED] excel formula to help my calculation from min dates of 3 dates cell ranges
    By breadwinner in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-04-2013, 10:32 AM
  3. Check dates in range either same dates or different dates by formula
    By breadwinner in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-12-2013, 07:42 AM
  4. Formula for dates in excel
    By laureen1985 in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 11-13-2012, 01:31 PM
  5. Formula Correction (concerning dates in excel)
    By The Exceller in forum Excel General
    Replies: 3
    Last Post: 06-09-2010, 03:07 PM
  6. Excel formula for due dates
    By blairsong01 in forum Excel General
    Replies: 1
    Last Post: 05-01-2009, 07:31 PM
  7. Excel formula required for dates
    By kev_stor in forum Excel General
    Replies: 1
    Last Post: 11-12-2008, 11:29 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