+ Reply to Thread
Results 1 to 20 of 20

Array Function? Find FTE changes before 03/26/2023 that are diff from after this date

  1. #1
    Forum Contributor
    Join Date
    11-19-2019
    Location
    Michigan
    MS-Off Ver
    Office 365
    Posts
    546

    Array Function? Find FTE changes before 03/26/2023 that are diff from after this date

    I dont know if this is possible but I have a large dataset with many employees. Each employee has repeating entries which identify any effective changes to their record. What I am interested in is to identify any FTE changes that happened to the first available record before 03/26/2023 to the first available record after 03/26/2023. The date I am referring to is the effective date.

    There are two sheets contained in this file:

    1. Desired Ouptut: basically what I want the formula to show me which are the instances of the changes before 03/26 and after 03/26
    2. This is the actual data to filter.

    This may be an impossible one, not sure or maybe I am over thinking it.
    Attached Files Attached Files

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,460

    Re: Array Function? Find FTE changes before 03/26/2023 that are diff from after this date

    See if this works for you:

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Contributor
    Join Date
    11-19-2019
    Location
    Michigan
    MS-Off Ver
    Office 365
    Posts
    546

    Re: Array Function? Find FTE changes before 03/26/2023 that are diff from after this date

    Wow! Cool formula. When I added the formula to the real data I did get other data that started to appear that I did not want to.
    I attached a file and you can see that Vatta, Alora is coming in but has no changes to FTE or Salary. Not sure if there is a way to prevent that?

    Thanks!
    Attached Files Attached Files

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,460

    Re: Array Function? Find FTE changes before 03/26/2023 that are diff from after this date

    I don't see where you mentioned salary in the original post - I'll take another look.

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,460

    Re: Array Function? Find FTE changes before 03/26/2023 that are diff from after this date

    Try this:

    Please Login or Register  to view this content.
    Attached Files Attached Files

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,460

    Re: Array Function? Find FTE changes before 03/26/2023 that are diff from after this date

    Or this (if you want Excel to generate the column headers as well):

    Please Login or Register  to view this content.
    Last edited by AliGW; 05-25-2023 at 09:50 AM. Reason: Code tags added.

  7. #7
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,460

    Re: Array Function? Find FTE changes before 03/26/2023 that are diff from after this date

    In case you want to include changes in the status column, too:

    Please Login or Register  to view this content.
    Attached Files Attached Files

  8. #8
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,460

    Re: Array Function? Find FTE changes before 03/26/2023 that are diff from after this date

    Seen, but no feedback ... Is this solved?

  9. #9
    Forum Contributor
    Join Date
    11-19-2019
    Location
    Michigan
    MS-Off Ver
    Office 365
    Posts
    546

    Re: Array Function? Find FTE changes before 03/26/2023 that are diff from after this date

    I just had a chance to put into my master file but I cannot figure some stuff out. My actual data has more columns than what I have provided because I wanted to keep it simple but it back fired. I tired to change but it was not working. I do not know what the 1,3,6 and 10,11 Arrays are..I think they are referring to the colums but I am not sure how to change. I added extra columns so you can see. I didnt populate any data but just put them in as place holders. Thsi array formula also has to be in a new sheet not in the same sheet as where the data is. NOt sure if that makes a difference in the formula.
    Can you please guide me or teach me how to fish?
    Attached Files Attached Files

  10. #10
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,460

    Re: Array Function? Find FTE changes before 03/26/2023 that are diff from after this date

    I will look tomorrow - I am now offline for the evening.

  11. #11
    Forum Contributor
    Join Date
    11-19-2019
    Location
    Michigan
    MS-Off Ver
    Office 365
    Posts
    546

    Re: Array Function? Find FTE changes before 03/26/2023 that are diff from after this date

    Thank you!

  12. #12
    Forum Contributor John Vergara's Avatar
    Join Date
    01-17-2022
    Location
    Colombia
    MS-Off Ver
    365
    Posts
    200

    Re: Array Function? Find FTE changes before 03/26/2023 that are diff from after this date

    Hi to all!

    Check this option:
    Please Login or Register  to view this content.
    Blessings!
    Attached Files Attached Files
    Last edited by John Vergara; 05-25-2023 at 02:58 PM.
    A out-of-context text is a pretext.
    Consider adding reputation points to all the people who help you with your question/problem.

  13. #13
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,460

    Re: Array Function? Find FTE changes before 03/26/2023 that are diff from after this date

    I am offering this as I don't think John's takes salary differences into account.

    Please Login or Register  to view this content.
    Thsi array formula also has to be in a new sheet not in the same sheet as where the data is. NOt sure if that makes a difference in the formula.
    Only in the first three variables, which need to have the sheet name in the array references.
    Attached Files Attached Files
    Last edited by AliGW; 05-25-2023 at 04:53 PM.

  14. #14
    Forum Contributor John Vergara's Avatar
    Join Date
    01-17-2022
    Location
    Colombia
    MS-Off Ver
    365
    Posts
    200

    Re: Array Function? Find FTE changes before 03/26/2023 that are diff from after this date

    Hi again to both!

    Thx AliGW for told me about the salaries. I fix the formula:

    Please Login or Register  to view this content.
    Check file. Blessings!
    Attached Files Attached Files

  15. #15
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: Array Function? Find FTE changes before 03/26/2023 that are diff from after this date

    Please try

    =LET(a,A1:A51,f,F1:F51,k,K1:K51,n,N1:N51,D,LAMBDA(d,DROP(VSTACK(d,0),1)),
    c,(a=D(a))*(D(n)>=DATE(2023,3,26))*((f<>(D(f)))+(k<>(D(k)))),FILTER(A1:O51,c+DROP(VSTACK(1,c),-1)))
    Attached Files Attached Files

  16. #16
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,460

    Re: Array Function? Find FTE changes before 03/26/2023 that are diff from after this date

    @Bo_Ry

    How would you build in changes in the status column?

    EDIT: Never mind - I worked it out:

    Please Login or Register  to view this content.
    I am curious to know how this works - how does it find the row with the date BEFORE 26/03/2023?
    Last edited by AliGW; 05-26-2023 at 01:59 AM.

  17. #17
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: Array Function? Find FTE changes before 03/26/2023 that are diff from after this date

    how does it find the row with the date BEFORE 26/03/2023?

    add this (n<DATE(2023,3,26))

    =LET(a,A1:A51,f,F1:F51,k,K1:K51,g,G1:G51,n,N1:N51,
    d,LAMBDA(d,DROP(VSTACK(d,0),1)),
    c,(a=d(a))*(d(n)>=DATE(2023,3,26))*(n<DATE(2023,3,26))*((f<>(d(f)))+(g<>(d(g)))+(k<>(d(k)))),
    FILTER(A1:O51,c+DROP(VSTACK(1,c),-1)))

  18. #18
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,460

    Re: Array Function? Find FTE changes before 03/26/2023 that are diff from after this date

    That wasn't my question. The formula already produces the right results - I was asking how. But I think I have worked it out - it relies on those two rows being consecutive rows in the table.

    Would adding the less than date allow it to work if the rows were NOT consecutive?

  19. #19
    Forum Contributor
    Join Date
    11-19-2019
    Location
    Michigan
    MS-Off Ver
    Office 365
    Posts
    546

    Re: Array Function? Find FTE changes before 03/26/2023 that are diff from after this date

    Thank you guys! Wow...you guys are amazing. Appreciate all your help!

  20. #20
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,460

    Re: Array Function? Find FTE changes before 03/26/2023 that are diff from after this date

    Glad to have helped.

    If that takes care of your original question, please choose Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, if you have not already done so, you may not be aware that you can thank anyone who offered you help towards a solution for your issue by clicking the small star icon (* Add Reputation) located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of all those who offered help.

+ 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] Date error: 29/2/2023 shows Wed 01/03/2023
    By SunOffice in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-26-2023, 08:38 AM
  2. Replies: 3
    Last Post: 04-20-2023, 11:29 PM
  3. Replies: 5
    Last Post: 03-09-2023, 03:29 AM
  4. Need Formula to Convert this Date Format 2023.02.28 to this 28-Feb-2023
    By gr445854 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 02-11-2023, 07:04 PM
  5. Replies: 1
    Last Post: 02-03-2023, 04:54 PM
  6. Replies: 8
    Last Post: 02-17-2021, 09:18 AM
  7. [SOLVED] Error 2023 - triggered by variable - Cant find mistake
    By Taktiker in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-22-2012, 09:11 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