+ Reply to Thread
Results 1 to 3 of 3

Calculate Number of Months

  1. #1
    Forum Contributor
    Join Date
    07-02-2012
    Location
    UK
    MS-Off Ver
    365/2008
    Posts
    152

    Calculate Number of Months

    Hopefully someone here can help me with a formula.

    I have a workbook with two worksheets. One sheet "Data" holds the data which is the last date of every month for a 10 year period.

    What I want to do is enter two dates on the "Calc" sheet and enter a formula in E5, of that sheet, to calculate how many of the dates on the "Calc" worksheet are between the two dates input. I hope this makes sense.

    I have attached an example.
    Attached Files Attached Files

  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,604

    Re: Calculate Number of Months

    Put this in E5:

    =SUMPRODUCT((Data!A2:A121>B3)*(Data!A2:A121<=B5))

    and format the cell as General.

    Hope this helps.

    Pete

  3. #3
    Registered User
    Join Date
    07-30-2013
    Location
    Mumbai, India
    MS-Off Ver
    Excel 2010
    Posts
    1

    Re: Calculate Number of Months

    Try this formula in cell E5:

    =COUNT(IF(Data!A2:A121>=B3,IF(Data!A2:A121<=B5,1)))

    and after entering the formula press Ctrl+Shift+Enter

    instead of just Enter Key
    This should do what you need.

+ 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. Calculate number of occurences with last 3 and 6 months
    By jpruffle in forum Excel General
    Replies: 4
    Last Post: 07-14-2009, 03:59 PM
  2. chart - calculate the number of months
    By svx123 in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 10-31-2007, 07:13 AM
  3. Calculate exact number of months
    By Potato2007 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-22-2007, 06:33 PM
  4. Calculate number of months between 2 dates
    By john liem in forum Excel - New Users/Basics
    Replies: 4
    Last Post: 06-01-2005, 10:05 AM
  5. [SOLVED] Calculate number of months between 2 dates
    By john liem in forum Excel - New Users/Basics
    Replies: 0
    Last Post: 06-01-2005, 06: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