+ Reply to Thread
Results 1 to 4 of 4

Formula help. Multiple criteria, duplicates, between dates.

  1. #1
    Forum Contributor
    Join Date
    02-07-2013
    Location
    London
    MS-Off Ver
    Excel 2019
    Posts
    105

    Formula help. Multiple criteria, duplicates, between dates.

    Hello everyone.

    I have a holiday tracker which also serves other purposes.
    Need a formula to sum holiday on separate (indirect function) tabs.

    Formula is to use :
    Month Start and End date of cycles M01 - M12 (Hol sheet K4:V5))
    Start and End date in AG and AH

    Formula is to meet the following criteria:
    Employee ID (Hol column C; cycle column AJ)
    Employee Role (Hol column E; cycle column D)
    Employee Name (Hol column D; cycle column C)

    If an employee had same role but changed contracted hours then the formula is to only sum holiday taken once at the most recent date range for given cycle.


    I figured max function could work plus countifs but i can't seem to get me head around it.

    The example i present in the attached workbook:
    a) shows one employee who started as S/w role cycle 1
    b) on cycle 2 the employee changed role to nurse
    c) on cycle 3 the employee started two roles and took hol on both.
    d) on cycle 4 the employee changed back to nurse
    e) on cycle 5 the employee changed contracted hours as a nurse (here i would like the holiday taken to sum on the most recent date for cycle 5 and show the other as duplicate and nil)

    Current formula
    Please Login or Register  to view this content.
    It uses only name and role at the moment; needs adding ID criteria.
    It does not work with dates yet; that's what i need help with.
    Plus needs to sum values on most recent date if all criteria met but date differs.

    Is it something that can be done?
    Last edited by annazet; 10-08-2018 at 05:38 AM.

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

    Re: Formula help. Multiple criteria, duplicates, between dates.

    The following mega formula yields the values that are indicated by the comments as well as the other values that were already displayed:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Note that the holiday value (5) for M05 will be displayed in O13 and "duplicate" will be displayed in O14
    Note that on sheet M03 and M04 Smith John 2 is changed to Smith John 1.
    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.

  3. #3
    Forum Contributor
    Join Date
    02-07-2013
    Location
    London
    MS-Off Ver
    Excel 2019
    Posts
    105

    Re: Formula help. Multiple criteria, duplicates, between dates.

    That's the one!
    Thank you JeteMc.

    Now I have realised sometimes the dates in last columns are in the past.
    When we put holiday on current cycle for past dates it does not show the values we process on current cycle.
    If there is a way around it I would really appreciate further help.

    This thread has been solved. Thank you.

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

    Re: Formula help. Multiple criteria, duplicates, between dates.

    You're Welcome. Thank You for the feedback and for marking the thread as 'Solved'. I hope that you have a blessed day.
    I feel that you may get better/faster results if you open another thread and upload another sample file to illustrate the issue with holidays.

+ 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] Lookup to match multiple criteria and return multiple results excluding duplicates.
    By kris3012 in forum Excel Formulas & Functions
    Replies: 15
    Last Post: 01-13-2018, 11:06 AM
  2. Replies: 10
    Last Post: 01-02-2017, 01:44 PM
  3. [SOLVED] Deleting Duplicates Based on Multiple Criteria from Multiple Columns
    By Franklic in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-09-2012, 05:31 PM
  4. Deleting multiple duplicates with criteria?
    By lukey2606 in forum Excel General
    Replies: 6
    Last Post: 05-12-2012, 03:08 PM
  5. Excel 2007 : Removing duplicates using multiple criteria
    By Rhinoceros77 in forum Excel General
    Replies: 0
    Last Post: 01-23-2012, 11:33 AM
  6. If formula between dates with multiple criteria
    By smart_as in forum Excel General
    Replies: 0
    Last Post: 07-14-2011, 10:57 AM
  7. Replies: 4
    Last Post: 04-19-2010, 11:12 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