+ Reply to Thread
Results 1 to 11 of 11

Extract the dates missing per item from a list of dates

  1. #1
    Registered User
    Join Date
    06-25-2018
    Location
    Spain
    MS-Off Ver
    MO 2013
    Posts
    5

    Extract the dates missing per item from a list of dates

    Hello forum!

    I am new here. I am very passionate about excel, and for that my boss assigned me a task to perform. This task is about to create a template, but now I am stuck because I have to use a matrix formula and I dont know how to use them properly. I will explain the procces very quickly, but my doubt is very specific.

    Template 1 (for user) - DONE
    Item Start date Finish date Status
    1 01/06/18 04/06/18 Check
    2 10/06/18 14/06/18 OK
    1 01/06/18 04/06/18 OK
    3 08/06/18 12/06/18 Check

    Template 2 (database per day) - DONE
    Item Date Status
    1 01/06/18 Check
    1 02/06/18 Check
    1 03/06/18 Check
    1 04/06/18 Check
    2 10/06/18 Ok
    2 11/06/18 OK
    2 12/ 06/18 OK
    2 13/06/18 OK
    2 14/06/18 OK
    1 01/06/18 OK
    1 02/06/18 OK
    1 03/06/18 OK
    1 04/06/18 OK
    3 08/06/18 Check
    3 09/08/18 Check
    .........so on.........
    3 12/06/18 Check

    This sheet is automatic from the template before. I think it is the best option to organize the data in order to analyze after because there are a lot of items. In this sheet, i am not totally sure if it is better to keep a history of each item when the status is “check” and then repeat it when turn into “Ok” or just update it when the user enter the record in the first template. Every suggestion is welcome.

    Template 3 (database of days missing per item) - NOT DONE

    Here I have to create a table like the above but with the missing date per item. I think I will have to use a matrix function but I am not sure about it. The table will be like this:

    Start date: 01/06/18
    Reference date: 30/06/18 (normally it will be today function)

    Item Date
    1 05/06/18
    1 06/06/18
    .....
    1 30/06/18
    2 01/06/18
    2 02/06/18
    .....
    2 09/06/18
    2 15/06/18
    2 16/06/18
    ....
    2 30/06/18
    3 01/06/18
    3 02/06/18
    3 03/06/18
    ....
    3 07/06/18
    3 13/06/18
    ...
    3 30/06/18

    Sorry if the message it is too long, i just wanted to explain the whole proccess, but my doubt it is mostly about the last template. I could do the template 2 without using matrix formulas but here i am not able to do it. Also, if you need to know there is a sheet with all the items listed with an ID (over 300).

    So, if you can help me i will really appreciate it.
    Thank very much.

    Ps: sorry for the format of the message but i am in the phone now, if you need a file to understand the problem better I can upload it tomorrow.

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

    Re: Extract the dates missing per item from a list of dates

    Hi Freelanx. Welcome to the forum.

    If I understand correctly try this:

    With Template 1 data in A:D in the below, array enter this formula in G2 and fill down until you get blanks.

    If you aren’t familiar with array-entered formulas array enter means the formula must be committed from edit mode by simultaneously pressing and holding down Ctrl and Shift while hitting Enter.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Then array enter this in F2 and fill down until you get blanks.
    Formula: copy to clipboard
    Please Login or Register  to view this content.




    A
    B
    C
    D
    E
    F
    G
    1
    Item
    Start date
    End date
    Status
    Item
    Date
    2
    1
    01/06/2018
    04/06/2018
    Check
    1
    02/06/2018
    3
    2
    10/06/2018
    14/06/2018
    OK
    1
    03/06/2018
    4
    1
    01/06/2018
    04/06/2018
    OK
    1
    05/06/2018
    5
    3
    08/06/2018
    12/06/2018
    Check
    1
    06/06/2018
    6
    2
    07/06/2018
    7
    2
    09/06/2018
    8
    3
    11/06/2018
    9
    3
    13/06/2018
    Dave

  3. #3
    Registered User
    Join Date
    06-25-2018
    Location
    Spain
    MS-Off Ver
    MO 2013
    Posts
    5

    Re: Extract the dates missing per item from a list of dates

    Thank you FlameRetired for your contribution, but I think I did not explain myself properly. I have uploaded a file as example to try to explain the problem in a better way.

    I will explain the process again using this example:

    "ITEMS" Tab: List of items available

    "ENTRIES" Tab: List where employees will enter the items and the period of date in which the item is filled in. Here there are two status possible:
    • OK: There will not be more changes.
    • Check: In the future, there will be a change to OK (USING EXACTLY THE SAME DATES). Always will be from Check to OK, never in other way.

    Here, the unique time in which is possible the overlapping of dates it is when there is a change in the status.


    "DAYS" Tab: It is the same list than "ENTRIES Tab", but broken down per day. Now, it is automatic wih a formula that I inserted but I would like also if you can help me o improve it using an array formula.

    Modification: Now it appear all the records inserted in the previous tab, but I would like to enter a formula that only recognize the last entries in order to not repeat the data and keep update the list. This changes is applicable only to the entries with Check status. So, in the example will disappear the data in red. (I re-check it and I did not put it in red, but it will be the first 4 rows of the table)

    "DAYS MISSING PER DAY": Here it is the table with the days missing per item in a period of time. Now it is filled manually, but I need to insert a formula which fill the columns automatically and, as I said before, I do not know where to start.

    In resume, I will need to improve the formula in the "DAYS" Tab and create a new one "DAYS MISSING PER DAY".

    PS: I create the file in spanish, because Excel in the office it is in Spanish and I do not know how Excel works when it has to translate the formulas. If you have any problem to open it please let me know.
    Attached Files Attached Files
    Last edited by Freelanx; 06-27-2018 at 03:03 AM.

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

    Re: Extract the dates missing per item from a list of dates

    See if this does what you want.

    The formulas I post are in American. I don't know the Spanish function names. Also these have argument separators ",". I would guess yours are ";".

    It should all translate in the upload.

    Edit Sucuri will not let me post the formulas and I do not know why. I will explain as best I can.

    For:
    DAYS" Tab:
    Find a separate table in columns H:L.

    The formula that returns IDs in H2 and filled down until you get blanks is an array formula. If you aren’t familiar with array-entered formulas array enter means the formula must be committed from edit mode by simultaneously pressing and holding down Ctrl and Shift while hitting Enter.

    The rest in that sheet are non array.

    I took liberties with the layout of sheet 'DAYS MISSING PER ITEM'. I have not found a way to return repeating Item numbers in column A.

    I opted to make a row F4:I4 of unique Item numbers. The formula in F5 must be array entered. Fill across column I and fill down until you get blanks.

    The dates agree with your hand typed example.

    Does this work for your purposes?

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

    Re: Extract the dates missing per item from a list of dates

    Oh yes. There is something I forgot to mention in the last post.

    In column C of 'DAYS MISSING PER ITEM' I put a formula. It has no relevance to the rest of the formulas. It was a way for me to check my formulas as I was building them. You can deleted them if you wish.

  6. #6
    Registered User
    Join Date
    06-25-2018
    Location
    Spain
    MS-Off Ver
    MO 2013
    Posts
    5

    Re: Extract the dates missing per item from a list of dates

    Sorry for the delay, I have been improving the template. Thank you for your answer FlameRetired, but it is not exactly what I needed it.

    Now what I need it is much easier (for someone who knows how array formulas works). As you can see in the file that I attach I have all the data as I want except the dates missing. I mean, in the tab in red there is one cell in red where should go a formula which I can fill down and obtain the same list than in the right. In the file, in this tab, the IDs are written manually, but this is no problem beacause I found the way to extract them by knowing the numbers of days missing, but I am suck in this point where I have to know exactly which days are missing.

    I guess the variables to use are: table of items, table of dates, start day and finish day.

    Thank you very much

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

    Re: Extract the dates missing per item from a list of dates

    I mean, in the tab in red there is one cell in red where should go a formula which I can fill down and obtain the same list than in the right.
    I have not been interpreting instructions correctly.

    I need your help. Please include in the upload a few hand typed dates that you expect in the red tab. With that information maybe I will be able to understand.

  8. #8
    Registered User
    Join Date
    06-25-2018
    Location
    Spain
    MS-Off Ver
    MO 2013
    Posts
    5

    Re: Extract the dates missing per item from a list of dates

    Now I cannot open the file because I am in the phone. What I need is to write in the cell in red in the tab in red a formula which I can pull it down and obtain EXACTLY the same than cells at the left (sorry I wrote left before).

    The logic behind of this is to get the days which are not included in the list of DAYS, but they are inside the defined period per each item.

    If you have any further question please ask me. Thank you very much for your help.

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

    Re: Extract the dates missing per item from a list of dates

    Try array entering (Ctrl + Shift + Enter) this in C5 'DAYS MISSING PER ITEM'. It will fill down automatically.

    Formula: copy to clipboard
    Please Login or Register  to view this content.

  10. #10
    Registered User
    Join Date
    06-25-2018
    Location
    Spain
    MS-Off Ver
    MO 2013
    Posts
    5

    Re: Extract the dates missing per item from a list of dates

    It works fine, but the problem is that depends on the B column which is the column that I have to calculate automatically through the formula that I am asking. It can depends on the A column because that column I already have it automatically in the real template, not in the example, or any other variables in the file.

  11. #11
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,556

    Re: Extract the dates missing per item from a list of dates

    The proposed solution employs a helper table (array) which may be moved and/or hidden for aesthetic purposes.
    A few cells of the array will need to be filled manually, namely the item numbers (I1:M1) and the number of the row that has the column headers (4 in cell H3)
    The first date (cell H4) is populated using: =C2
    The rest of the dates (H5:H20)are populated using: =IF(SUM(MAX(H$4:H4),1)>F$2,"",SUM(H4,1))
    I2:M2 are populated using: =COUNTIFS(I4:I26,TRUE)
    I3:M3 are populated using: =SUM(H3,I2)
    I4:M20 are populated using:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    A5:A46 are populated using:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    B5:B46 are populated using:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

+ 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] List Missing Dates in Userform Combobox
    By sriley5 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 06-16-2017, 02:45 PM
  2. [SOLVED] List Missing Dates
    By sriley5 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-16-2017, 10:53 AM
  3. Populating list of dates from another sheet with Start Dates and End Dates
    By Jesshloly in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-05-2015, 04:07 AM
  4. Insert missing dates into a list of dates using vba
    By Declamatory in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-24-2015, 12:18 PM
  5. Finding Missing Dates In a Column of Dates
    By ExcelStudent123 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-09-2014, 05:37 PM
  6. [SOLVED] Formula to find missing dates from a list of dates
    By PWinkz in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-22-2014, 08:11 AM
  7. [SOLVED] Highlight Group of Dates if Dates Match List of other Dates
    By martinpgibson in forum Excel General
    Replies: 5
    Last Post: 10-24-2012, 08:14 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