Recreating ARRAY_CONSTRAIN(ARRAYFORMULA in excel

Anonymous
2021-03-10T16:28:02+00:00

I have a formula in a Google Sheet that we are transitioning into excel. I'm not sure if this is the most effective way to accomplish what we'd like to do. 

We have a chart of dates on one tab (Date Tables), and I'm trying to return the soonest date following a reference date in my main sheet.

Our Date Tables Sheet has includes the first date of each pay period ongoing.  Based on the date in cell O2, I need the formula to return the soonest date from the list FOLLOWING their 6 Month Anniversary

Date Tables Sheet has the Pay Period Start Dates in Column B. In this instance I would need it to return "9/13/2021"

The formula we were using in Google Sheets is =ARRAY_CONSTRAIN(ARRAYFORMULA(IF(E2<>"",MIN(IF('Date Tables'!$B:$B>=(E2+182),'Date Tables'!$B:$B)),"")), 1, 1)

The formula was also calculating the 6 months which we no longer need it to do.

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
{count} votes
Answer accepted by question author
  1. Anonymous
    2021-03-10T19:38:23+00:00

    I think I need something that determines what the "next" date in the chart is. So, if the date in O2 is 9/6, I need something that references the table and identifies that 09/06 is greater than 08/30 but less than 09/13 and then know to return 09/13

    It does that only, please see screenshot below

    if you are not using a table, you can use

    =IFERROR(INDEX(Sheet1!$B$3:$B$21,MATCH(O2,Sheet1!$B$3:$B$21,1)+1),"No Date found")

    0 comments No comments

4 additional answers

Sort by: Most helpful
  1. Anonymous
    2021-03-10T16:49:08+00:00

    say your date table is converted to a table (select the cells and press ctrl+t) named "DateTable"

    you can use the following formula in cell P2 and copy down

    =IFERROR(INDEX(DateTable[1st day of pay period],MATCH(O2,DateTable[1st day of pay period],1)+1),"No Date found")

    0 comments No comments
  2. Anonymous
    2021-03-10T17:41:35+00:00

    This didn't work - it came back as "No Date Found".

    I think I need something that determines what the "next" date in the chart is. So, if the date in O2 is 9/6, I need something that references the table and identifies that 09/06 is greater than 08/30 but less than 09/13 and then know to return 09/13

    0 comments No comments
  3. Ashish Mathur 100.8K Reputation points Volunteer Moderator
    2021-03-10T23:05:49+00:00

    Hi,

    In cell P2, enter this formula

    =XLOOKUP(O2,$B$2:$B$20,$B$2:$B$20,"",1)

    Hope this helps.

    0 comments No comments
  4. Anonymous
    2021-03-11T14:32:43+00:00

    This worked! Thank you so much.

    0 comments No comments