+ Reply to Thread
Results 1 to 5 of 5

Specific dates formula help

  1. #1
    Registered User
    Join Date
    12-24-2018
    Location
    USA
    MS-Off Ver
    MS Office 2018
    Posts
    2

    Specific dates formula help

    I am trying to find how many 15th’s and 23rd’s between 2 calendar days?

    Basically:

    Example: if in one column I put 1/16/2018 and in one column put 3/20/2018, then last column would show 4.
    Screen Shot 2018-12-23 at 9.40.27 PM.png



    What would be the formula to get A and B to get C????

  2. #2
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,914

    Re: Specific dates formula help

    try
    =DATEDIF(EOMONTH(A2-15,0),EOMONTH(B2-14,0)+5,"m")+DATEDIF(EOMONTH(A2-23,0),EOMONTH(B2-22,0)+5,"m")
    Samba

    Say thanks to those who have helped you by clicking Add Reputation star.

  3. #3
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: Specific dates formula help

    Or try

    =SUMPRODUCT(--(DAY(ROW(INDIRECT(A2&":"&B2)))={15,23}))

    Or
    =SUM(--(DAY(A2)<={15,23}))+SUM(--(DAY(B2)>={15,23}))+2*(MONTH(B2)-MONTH(A2)+(YEAR(B2)-YEAR(A2))*12)-2
    Last edited by Bo_Ry; 12-24-2018 at 03:14 AM.

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

    Re: Specific dates formula help

    In C2

    =SUMPRODUCT((DAY(ROW(INDIRECT(A2&":"&B2)))=15)+(DAY(ROW(INDIRECT(A2&":"&B2)))=23))

    Pl see file. Date in dd/mm/yy format.
    Attached Files Attached Files
    Pl note
    Array formula should be confirmed with Ctrl+Shift+Enter keys together.
    If answere is satisfactory press * to add reputation.

  5. #5
    Registered User
    Join Date
    12-24-2018
    Location
    USA
    MS-Off Ver
    MS Office 2018
    Posts
    2

    Re: Specific dates formula help

    This is perfect!!! Thank you guys!!!

+ 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. Formula for number of months for specific year between two dates
    By KalaiP in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 01-01-2018, 01:05 PM
  2. Formula to calculate Specific dates and times
    By aloggies in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-13-2015, 12:39 PM
  3. [SOLVED] Need formula to return a specific value if a specified date is between two other dates
    By BeachRock in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-04-2014, 02:03 PM
  4. Specific dates in IF formula
    By danielball in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-24-2014, 08:14 PM
  5. [SOLVED] A formula to countdown dates given a time span that is specific
    By poshbikerchick in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-05-2012, 06:07 AM
  6. Having a formula count only specific dates.
    By szm187 in forum Excel General
    Replies: 3
    Last Post: 03-15-2012, 11:28 AM
  7. Formula to omit Specific dates
    By jaydee in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-24-2008, 12:04 PM

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