+ Reply to Thread
Results 1 to 6 of 6

Seeking help to solve problem regarding checking & counting a date within a period

  1. #1
    Registered User
    Join Date
    02-23-2021
    Location
    HK
    MS-Off Ver
    2013
    Posts
    69

    Seeking help to solve problem regarding checking & counting a date within a period

    I would like to seek someone's assistance to solve the following problems.

    According to the current maintenance contract period (blue), two test dates are to be conducted in 3 & 5 years respectively within the contract period.

    In orange columns, it is designed to check whether tests are completed in 3 & 5 years respectively.

    In green columns, two dates of tests are to be indicated in the cells according to the current contract period.

    First Test to be conducted after the commencement of the contract within 3 years
    The second (5 years) test is to be conducted 6 months in advance based on the last date of the contract.
    Attached Images Attached Images
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2016 & H&B2021
    Posts
    3,139

    Re: Seeking help to solve problem regarding checking & counting a date within a period

    Try this: Q7=IF(YEAR(EOMONTH($D7,36-1))=Q$5,EOMONTH($D7,36-1),IF(YEAR(EOMONTH($E7,-6)+1)=Q$5,EOMONTH($E7,-6)+1,"")), copy across and down.

  3. #3
    Registered User
    Join Date
    02-23-2021
    Location
    HK
    MS-Off Ver
    2013
    Posts
    69

    Re: Seeking help to solve problem regarding checking & counting a date within a period

    Thanks, josephteh, I have obtained the result successfully. Would it be possible to help to solve the following problems?


    According to the current maintenance contract period (blue), two test dates are to be conducted in 3 & 5 years respectively within the contract period.

    In orange columns, it is designed to check whether tests are completed in 3 & 5 years respectively.

    Please help to make comments on the following formulas to reach the expected results shown in the attached file. Thanks

    O7=IF(COUNTA($F7:$L7),ROUND(3-YEARFRAC(MAX($F7:$L7),TODAY(),1),1),"No Record"
    P7=IF(COUNTA($F7:$L7),ROUND(2-YEARFRAC(MAX($F7:$L7),TODAY(),1),1),"No Record")
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2016 & H&B2021
    Posts
    3,139

    Re: Seeking help to solve problem regarding checking & counting a date within a period

    Try this,

    O7=IF(SUMPRODUCT((F7:N7)*(F7:N7>=D7)*(F7:N7<EDATE(D7,36)))>0,"Tested",IF(AND(P7<>"Tested",EOMONTH($D7,36-1)>TODAY()),(EOMONTH($D7,36-1)-TODAY())/365,"No Record")), copy down.

    P7=IF(SUMPRODUCT((F7:N7)*(F7:N7>=D7)*(F7:N7>=EDATE(D7,36))*(F7:N7<EDATE(D7,60)))>0,"Tested",(EOMONTH($E7,-6)+1-TODAY())/365), copy down.

  5. #5
    Registered User
    Join Date
    02-23-2021
    Location
    HK
    MS-Off Ver
    2013
    Posts
    69

    Re: Seeking help to solve problem regarding checking & counting a date within a period

    Thanks, josephteh, I found the formula can fix the problem, but there is a minor problem.

    The cells indicated "#VALUE!" after my modification of the formulas shown below.
    Would you mind letting me know the problem with the amended formulas? Thanks

    O7=ROUND(IF(SUMPRODUCT((F7:N7)*(F7:N7>=D7)*(F7:N7<EDATE(D7,36)))>0,"Tested",IF(AND(P7<>"Tested",EOMONTH($D7,36-1)>TODAY()),(EOMONTH($D7,36-1)-TODAY())/365,"No Record")),1)
    P7=ROUND(IF(SUMPRODUCT((F7:N7)*(F7:N7>=D7)*(F7:N7>=EDATE(D7,36))*(F7:N7<EDATE(D7,60)))>0,"Tested",(EOMONTH($E7,-6)+1-TODAY())/365),1)
    Attached Images Attached Images
    Attached Files Attached Files

  6. #6
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2016 & H&B2021
    Posts
    3,139

    Re: Seeking help to solve problem regarding checking & counting a date within a period

    Try this:

    O7=IF(SUMPRODUCT((F7:N7)*(F7:N7>=D7)*(F7:N7<EDATE(D7,36)))>0,"Tested",IF(AND(P7<>"Tested",EOMONTH($D7,36-1)>TODAY()),ROUND((EOMONTH($D7,36-1)-TODAY())/365,1),"No Record"))

    P7=IF(SUMPRODUCT((F7:N7)*(F7:N7>=D7)*(F7:N7>=EDATE(D7,36))*(F7:N7<EDATE(D7,60)))>0,"Tested",ROUND((EOMONTH($E7,-6)+1-TODAY())/365,1))

+ 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. Excel: Counting Date period question
    By kevinko14 in forum Excel General
    Replies: 2
    Last Post: 08-12-2021, 11:43 PM
  2. seeking coaching or tutoring help to solve sql case study
    By vineet sharma in forum Access Tables & Databases
    Replies: 5
    Last Post: 11-09-2017, 05:33 PM
  3. seeking coaching or tutoring help to solve sql case study
    By vineet sharma in forum Access Tables & Databases
    Replies: 2
    Last Post: 07-20-2017, 10:31 AM
  4. [SOLVED] Counting specific phrases within a given date period
    By antcha in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-16-2015, 07:42 PM
  5. [SOLVED] Extract first date from specific period counting working days only
    By nicoan in forum Excel General
    Replies: 2
    Last Post: 06-20-2014, 11:24 PM
  6. counting unique entries for a specific date period in a series of dates
    By woody382 in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 05-16-2010, 01:57 PM
  7. Counting data based on a date period eg. Month
    By jennyp in forum Excel General
    Replies: 3
    Last Post: 01-17-2008, 09:02 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