+ Reply to Thread
Results 1 to 9 of 9

Count monts between two date with criteria

  1. #1
    Forum Expert avk's Avatar
    Join Date
    07-12-2007
    Location
    India
    MS-Off Ver
    Microsoft Office 2013
    Posts
    3,223

    Count monts between two date with criteria

    I am using excel 2007.
    In column "a" : dates
    In column "b" : partno
    In column "c" : partcod (column "b" & "c" is same. column "c" for using criteria)
    In column "d" : I have calculate : How many months comes from column "a" with particular partno which is mentioned in column "b" with criteria mentioned in column "c".

    column "a" "b" "c" "d"
    Date Partno partcod calculate
    31-Jul-12 02.002.10
    21-Nov-12 02.002.10
    13-Mar-13 02.002.10
    22-Jun-13 02.002.10
    28-Aug-13 02.002.10
    30-Sep-13 02.002.10
    22-Nov-13 02.002.10
    26-Dec-13 02.002.10
    14-Feb-14 02.002.10
    07-May-14 02.002.10
    16-May-14 02.002.10
    14-Jun-14 02.002.10 02.002.10 (here calculate no of months)
    Last edited by avk; 06-17-2014 at 02:29 PM. Reason: SOLVED

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Count monts between two date with criteria

    Hi,

    Have you tried a Pivot Table?
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Forum Expert avk's Avatar
    Join Date
    07-12-2007
    Location
    India
    MS-Off Ver
    Microsoft Office 2013
    Posts
    3,223

    Re: Count monts between two date with criteria

    Hello Sir, No i am not tried with Pivot Table. Required formula.

  4. #4
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Count monts between two date with criteria

    If you need a formula would you upload the workbook and manually add some typical results.

    Why incidentally are you reluctant to use a Pivot Table which would take mere seconds to set up and deliver an answer?

  5. #5
    Forum Expert avk's Avatar
    Join Date
    07-12-2007
    Location
    India
    MS-Off Ver
    Microsoft Office 2013
    Posts
    3,223

    Re: Count monts between two date with criteria

    With Pivot i am not familiar. Hence i required formula.

    =(YEAR(B13)-YEAR(B2))*12+MONTH(B13)-MONTH(B2)
    as per above formula we have calculated total number of months. But i required criteria with specific partno which is mentioned in column "b". & criteria partcod mentioned in column "c".

  6. #6
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Count monts between two date with criteria

    If you upload the workbook (as requested) I'll take a look.

    May I respectfully suggest that you do become familiar with Pivot Tables. For many tasks (yours being one) they are far superior to functions.

  7. #7
    Forum Expert avk's Avatar
    Join Date
    07-12-2007
    Location
    India
    MS-Off Ver
    Microsoft Office 2013
    Posts
    3,223

    Re: Count monts between two date with criteria

    Yes. Thanks for suggestion. I will more practice with Pivot. Here i attach sample file. I have mentioned our remark in attach file.
    Attached Files Attached Files

  8. #8
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Count monts between two date with criteria

    Hi,

    Try

    Formula: copy to clipboard
    Please Login or Register  to view this content.

  9. #9
    Forum Expert avk's Avatar
    Join Date
    07-12-2007
    Location
    India
    MS-Off Ver
    Microsoft Office 2013
    Posts
    3,223

    Re: Count monts between two date with criteria

    Thanks. got it.

+ 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. Sumproduct - Count more than one criteria by date
    By drivera74 in forum Excel General
    Replies: 16
    Last Post: 08-19-2015, 10:35 AM
  2. [SOLVED] Count of data with a date criteria
    By FM1 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 12-02-2013, 10:26 AM
  3. How to count date as a criteria in countifs
    By huntersdad in forum Excel General
    Replies: 7
    Last Post: 03-29-2011, 07:38 AM
  4. Using VBA to count Criteria based on Date
    By baisty182 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-04-2011, 07:10 AM
  5. Count based on date and other criteria
    By Karleajensar in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-06-2007, 09:09 AM

Tags for this Thread

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