+ Reply to Thread
Results 1 to 6 of 6

Multi-Cristeria Formula using LEFT and FIND and DATES and TIMES to refine criteria

  1. #1
    Registered User
    Join Date
    05-28-2014
    Posts
    18

    Multi-Cristeria Formula using LEFT and FIND and DATES and TIMES to refine criteria

    Having difficulties using Sumproduct, SUMIFS and others trying to perform a multi criteria formula that includes a LEFT/FIND criteria and date/time criteria.

    I am trying to find the last Finish (Referencing the End Time to the current row Start Time) entry with a matching name pre-fix only. I'll attach a summarized example.

    Any suggestions?
    Attached Files Attached Files

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: Multi-Cristeria Formula using LEFT and FIND and DATES and TIMES to refine criteria

    I will see what I can come up with, but you need to avoid using full-column references in sumproduct - it will slow your file down. Rather, use only what you need, or use a dynamic reference.

    Are you OK with using a helper column?
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: Multi-Cristeria Formula using LEFT and FIND and DATES and TIMES to refine criteria

    If you can use a helper (I used F2, down), use this
    =LEFT(A2,FIND("-",A2,1)-1)
    copied down

    Then use this ARRAY formula, copied down...
    =INDEX($E$2:E2,MATCH(MAX(IF($F$2:F2=F2,$B$2:B2)),$B$2:B2,0))
    ...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer. Press F2 on that cell and try again.

    Alternatively, use the ARRAY formula without the helper...
    =INDEX($E$2:E2,MATCH(MAX(IF(LEFT($A$2:A2,FIND("-",$A$2:A2,1)-1)=LEFT(A2,FIND("-",A2,1)-1),$B$2:B2)),$B$2:B2,0))

    However, I dont understand how you get from E6, down

  4. #4
    Registered User
    Join Date
    05-28-2014
    Posts
    18

    Re: Multi-Cristeria Formula using LEFT and FIND and DATES and TIMES to refine criteria

    FDibbins,

    Humm....that's a good start.

    However, it does not address the change in dates/times. The max functions works great but, need it to have another criteria that removes C dates > than current row B date/time.

    Any suggestions?

  5. #5
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: Multi-Cristeria Formula using LEFT and FIND and DATES and TIMES to refine criteria

    Which is probably where my question comes in...
    However, I dont understand how you get from E6, down

  6. #6
    Registered User
    Join Date
    05-28-2014
    Posts
    18

    Re: Multi-Cristeria Formula using LEFT and FIND and DATES and TIMES to refine criteria

    FDibbins,

    Yes. And, thank you for trying.

    I am stumped. Funny cause when I think it out it should be relatively easily solved. But, I am missing something.

    Thanks again for the attempt.

+ 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. Find Value If Multi Criteria Matches Index
    By exc4libur in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 05-05-2011, 09:05 PM
  2. Average of dates and times if it meets a specific criteria
    By Shadoweski in forum Excel General
    Replies: 1
    Last Post: 09-28-2010, 10:26 AM
  3. Excel 2007 : Refine a countif formula
    By joesport5 in forum Excel General
    Replies: 3
    Last Post: 04-23-2010, 02:53 PM
  4. Multi-criteria countif functions for dates...possible?
    By Rekli in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 10-11-2006, 05:51 PM
  5. [SOLVED] find days and hours between 2 sets of dates and times
    By The Auditor in forum Excel General
    Replies: 1
    Last Post: 02-03-2006, 04:10 PM
  6. how do i find # hrs & mins. between 2 different dates and times
    By tankerman in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-13-2005, 11:05 AM
  7. Refine search criteria for Find Method
    By ExcelMonkey in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-20-2005, 10:05 AM

Tags for this Thread

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