+ Reply to Thread
Results 1 to 4 of 4

Counting the number of days in a Quarter from a date range

  1. #1
    Registered User
    Join Date
    03-31-2012
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    84

    Counting the number of days in a Quarter from a date range

    I'm having a bit of a mind bank with this one...

    There are two columns

    Start Date | End Date
    03/05/2015 28/09/2015
    09/09/2015 15/10/2015
    ...

    I'm looking for a formula that would output the number of days from the start to the end date (inclusive) that fall within a certain quarter (pre-selected through a drop down). I have a helper table built in the following format that can be used as a lookup:

    Quarter Name | First date in quarter | Last date in quarter
    Q3 2015 01/06/2015 30/09/2015
    ...


    So if 'Q3 2015' is selected from the dropdown, in C2 the formula would output 90 (days)

    Any suggestions gladly received...

  2. #2
    Valued Forum Contributor quekbc's Avatar
    Join Date
    01-18-2010
    Location
    Sydney, Australia
    MS-Off Ver
    2010, 2013, 2016
    Posts
    1,149

    Re: Counting the number of days in a Quarter from a date range

    You can take the End Date minus the Start Date + 1.

    Example, Start date is in B1, End date is in C1, the number of days between the start and end dates are =C1 - B1 + 1

    To get the relevant dates from a dropdown selection, you can use a combination of INDEX / MATCH functions.

    E.g. =INDEX(LastDateinQtr, MATCH(DropDown, QuarterNames,0)) - INDEX(FirstDateinQtr, MATCH(DropDown, QuarterNames,0)) + 1

  3. #3
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,587

    Re: Counting the number of days in a Quarter from a date range

    If A8 is drop down B8 & C8 are corresponding dates
    Please Login or Register  to view this content.
    First Date given for Q3 is wrong .Pl correct it as 01/07/2015.
    Last edited by kvsrinivasamurthy; 08-05-2015 at 12:17 AM.

  4. #4
    Registered User
    Join Date
    03-31-2012
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    84

    Re: Counting the number of days in a Quarter from a date range

    kvsrinivasamurthy - thank you! Worked perfectly

+ 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. Counting number of days, including start date, without using +1
    By Crappy in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-07-2014, 05:05 AM
  2. [SOLVED] Counting the number of days overdue based on date and time
    By Barking_Mad in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 09-08-2014, 10:57 AM
  3. Count number of days in a quarter
    By Darkpork in forum Excel General
    Replies: 3
    Last Post: 07-16-2010, 05:22 AM
  4. Compute number of days per quarter
    By refstone in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-07-2008, 03:11 PM
  5. Average Number of Days in a Quarter
    By dvent in forum Excel General
    Replies: 11
    Last Post: 11-16-2007, 05:23 AM
  6. Replies: 1
    Last Post: 07-07-2005, 04:00 PM
  7. [SOLVED] Counting the number of days between two date
    By Maddoktor in forum Excel General
    Replies: 1
    Last Post: 06-03-2005, 10:05 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