+ Reply to Thread
Results 1 to 5 of 5

Flag Earliest Date in Array

Hybrid View

  1. #1
    Registered User
    Join Date
    06-21-2016
    Location
    Minneapolis, Minnesota
    MS-Off Ver
    2010
    Posts
    16

    Flag Earliest Date in Array

    Hey All,

    Looking for a way to aggregate all as of dates into one descriptor based on its open date. For example, if I have 2 accounts with as of dates of 3/1/18 and 7/1/18 and account open dates of 3/28/18 and 6/29/18, I want those as of dates under "M1" or month1. For these same accounts, I'd like the following month as of dates (4/1/18 and 8/1/18) to be "M2". See image below.

    Dummy.png


    Basically the as of dates are the end of month balance for that month and I want to know how many were funded in M1 and M2. This may be convuluted so I attached dummy data.

    I basically tried setting the account open date to the first day of that month and used this as an account open date2. I then matched account open date2 with the as of date array.

    The problem I'm running into under the "My Solution" part is that there shoud be an as of date for the month the account opened (accounts opened in June should have an as of date of June). However, due to some factors, the earliest as of date might be 1 or more months after the account opened.

    I highlighted in yellow this issue. If my approach was way off I'm open to new ones.

    This was more difficult to explain than I had thought. My apologies!
    Attached Images Attached Images
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,640

    Re: Flag Earliest Date in Array

    1. Column D custom formatted with "M"##
    2. D3:
    =IFERROR(DATEDIF(MIN($B3,EOMONTH($B3,-1)+1),$C3,"m"),0)+1
    Attached Files Attached Files
    Ben Van Johnson

  3. #3
    Registered User
    Join Date
    06-21-2016
    Location
    Minneapolis, Minnesota
    MS-Off Ver
    2010
    Posts
    16

    Re: Flag Earliest Date in Array

    It looks like you're running into the same issue as I am where cell D8 in your spreadsheet should be "M1" and not "M2"

  4. #4
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2405
    Posts
    13,422

    Re: Flag Earliest Date in Array

    Since the opening condition is IF(I8=H8,"M1", and column I values never equal H values (except row 14) so can never return "M1".

    What am I still missing?
    Last edited by FlameRetired; 01-15-2019 at 10:46 PM.
    Dave

  5. #5
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2405
    Posts
    13,422

    Re: Flag Earliest Date in Array

    This returns the desired output. I am not certain it follows the intended logic.

    It "fixes" the last "as of date" per account number as the start date in DATEDIF. In column L.
    Formula: copy to clipboard
    ="M"&DATEDIF(INDEX($C$3:$C$14,MATCH(2,INDEX(1/(A3=$A$3:$A$14),0),1)),C3,"M")+1
    Attached Files Attached Files

+ 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 to find the earliest date in excel base on a given date and text
    By Rikii Sumat in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 10-27-2017, 02:35 AM
  2. Replies: 3
    Last Post: 02-10-2016, 07:26 PM
  3. Replies: 1
    Last Post: 11-25-2015, 03:31 PM
  4. Expert Required: How to display the values of a date or the next earliest date
    By newtotheblock in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-19-2015, 12:02 PM
  5. extract earliest date from array for list of known values
    By dungeon_master in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-16-2012, 08:44 AM
  6. Pivot Automation: Remove earliest date and add 1 date (Rows)
    By 4am in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-03-2011, 04:50 PM
  7. array to flag consistant high value
    By guerillaexcel in forum Excel General
    Replies: 24
    Last Post: 08-20-2010, 07:09 AM

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