+ Reply to Thread
Results 1 to 4 of 4

Return a exact value in a months and year columns based on start and end dates

  1. #1
    Forum Contributor
    Join Date
    08-19-2020
    Location
    Dubai
    MS-Off Ver
    Office365
    Posts
    131

    Return a exact value in a months and year columns based on start and end dates

    Hi,


    Required a formula to help to return the results as mentioned in the sample sheet.

    Return the results for a given month and year based on the start and end period dates (in Column C to J)

    In the case of related months covering full days, it should return a number of 1; in the case of months not covering a full month, it should return a value like the exact days of a month divided by the full days of that month.

    Sample sheet expected results are enclosed.


    Many thanks

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,002

    Re: Return a exact value in a months and year columns based on start and end dates

    Try:
    =LET(As,EOMONTH($A4,-1)+1,Ae,EOMONTH($A4,0),Be,EOMONTH($B4,-1)+1,Hs,EOMONTH(C$3,0),He,EOMONTH(C$3,0),IF(C$3<As,"",IF(AND(As=C$3,$B4>=Hs),(Hs-$A4+1)/DAY(He),
    IF(AND(As=C$3,$B4<Hs),($B4-$A4+1)/DAY(Hs),IF(AND(C$3>Ae,C$3<Be),DAY(Hs)/DAY(Hs),IF(Be=C$3,DAY($B4)/DAY(Hs),""))))))
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  3. #3
    Forum Contributor
    Join Date
    08-19-2020
    Location
    Dubai
    MS-Off Ver
    Office365
    Posts
    131

    Re: Return a exact value in a months and year columns based on start and end dates

    Many thanks for the formula solution,

    i would appreciate it if you could provide a shorter formula, since a large amount of data needs to be applied.

    Thanks,

  4. #4
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,002

    Re: Return a exact value in a months and year columns based on start and end dates

    No. I can't.

+ 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. [SOLVED] Count months in a calendar year based on a start date
    By NotTheBest in forum Excel General
    Replies: 5
    Last Post: 06-30-2021, 02:50 AM
  2. [SOLVED] Return months based on year
    By Abdur_rahman in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-21-2020, 04:20 AM
  3. Determine due dates in coming year based on a start date and an interval
    By Skibbs7924 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-16-2019, 06:09 PM
  4. Replies: 2
    Last Post: 06-18-2018, 05:43 AM
  5. Average from whole months data taking a exact date to start with.
    By francesc in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-07-2014, 10:54 PM
  6. Calculate rate increases based on financial year and start dates
    By cowproduct in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-03-2012, 08:25 AM
  7. Replies: 2
    Last Post: 08-03-2012, 08:23 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