+ Reply to Thread
Results 1 to 7 of 7

Formula not finding start and end dates for subsequent months in range

  1. #1
    Valued Forum Contributor
    Join Date
    01-16-2012
    Location
    England
    MS-Off Ver
    MS 365
    Posts
    1,397

    Formula not finding start and end dates for subsequent months in range

    Attached file Datespan.xlsx lists months and Start and End Dates in Cols AI - AK.

    User sets "First month" through Data Validation in A3.

    "Index/Match" in A2 and B2 identify correctly the Start and end dates for that first month

    Cols C - W then show subsequent eleven months using Formula =EOMONTH(A3,"whatever")

    But Index/Match formula does not show the Start and End dates for them.

    Any suggestions and solutions received gratefully

    Ochimus

  2. #2
    Forum Expert
    Join Date
    12-09-2014
    Location
    Trakai, Lithuania
    MS-Off Ver
    2016
    Posts
    1,296

    Re: Formula not finding start and end dates for subsequent months in range

    I offer this option.
    Attached Files Attached Files

  3. #3
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Formula not finding start and end dates for subsequent months in range

    Hi Robert,

    C2: =INDEX($AI:$AI,MATCH(C3,$AI$1:$AI$26,0)) and MATCH(C3,$AI$1:$AI$26,0) looking for the exact value of C3 in $AI$1:$AI$26 range. It can't be done because there is no value = C3.
    Excel stores dates as sequential serial numbers so they can be used in calculations.
    See: If A3 = Jan-15 and next C3 = Feb-15 but in real this is a number 42063 (28/02/2015).
    In the same time in $AI$1:$AI$26 range you have date: Feb-15 (cell AI6) what is a number: 42036 (01/02/2015).
    Looks the same (Feb-15) but they are different (42063 <> 42036 | 28/02/2015 <> 01/02/2015) so you have an error: #N/A, because C3 doesn't equal AI6. Btw, I think this is not error but info: Not Available
    Excel working with numbers but not with a visual representation of the date.

    In this case, I recommend to use =EDATE(A3,1) instead of =EOMONTH(A3,1) because EOMONTH() returns the serial number for the last day of the month that is the indicated number of months before or after start_date. Use EOMONTH to calculate maturity dates or due dates that fall on the last day of the month, but EDATE() returns the serial number that represents the date that is the indicated number of months before or after a specified date (the start_date). Use EDATE() to calculate maturity dates or due dates that fall on the same day of the month as the date of issue.

    btw, imho C2 should be: =INDEX($AI:$AK,MATCH(C3,$AI$1:$AI$26,0),2), D2: =INDEX($AI:$AK,MATCH(C3,$AI$1:$AI$26,0),3) if headers have to be consistent, but it's up to you

  4. #4
    Forum Expert
    Join Date
    12-09-2014
    Location
    Trakai, Lithuania
    MS-Off Ver
    2016
    Posts
    1,296

    Re: Formula not finding start and end dates for subsequent months in range

    I offer this option.

  5. #5
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Formula not finding start and end dates for subsequent months in range

    look at post time

  6. #6
    Valued Forum Contributor
    Join Date
    01-16-2012
    Location
    England
    MS-Off Ver
    MS 365
    Posts
    1,397

    Re: Formula not finding start and end dates for subsequent months in range

    Many thanks to everyone who "chipped in", and especially for the download.

    Can't believe I was daft enough to use different days in Row 3 to Column AI!

    And Sandy is quite correct that headers should have been consistent - as my grandchildren will probably be asked by the User in twenty years' time how I achieved the end result.

    Ochimus

  7. #7
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Formula not finding start and end dates for subsequent months in range

    You are welcome and thanks for rep

+ 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. Need a formula with flexible start and end dates from a range
    By Lax97 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-18-2017, 12:23 PM
  2. Replies: 9
    Last Post: 02-11-2015, 05:47 PM
  3. [SOLVED] Creating a formula to populate range of cells between dates based on start and end dates
    By Rainmain82 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 07-20-2014, 07:42 PM
  4. [SOLVED] Creating a formula to populate range of cells between dates based on start and end dates
    By Rainmain82 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 07-18-2014, 07:55 AM
  5. Find months between start and end dates and multiple the monthly revenue
    By Vinnie Chan in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-09-2013, 05:22 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