+ Reply to Thread
Results 1 to 7 of 7

Formula Help with Multiple Criteria and two data sets

  1. #1
    Registered User
    Join Date
    11-15-2023
    Location
    New York
    MS-Off Ver
    Excel 2016
    Posts
    1

    Formula Help with Multiple Criteria and two data sets

    Good morning. I'd be very grateful to anyone who could help with this. I have two data sets (see attachment).

    In Column Q (Total Time) of the green set I'm trying to write a formula that will tell me the total time it takes to get from Step ___ to Step ____ represented by the data in Columns O & P.

    The data that needs to be added up to get the Total Time is located in the white data set below. I need to be able to match Column B (Part_WO) in the green set to Column A in the white set so that I'm able to get the data from the correct row.

    I then need look at ROW 2 (header row on white set of data) and determine which headers are >= Column O (ROUTE_STEP_NUM) AND <= Column P (NEXT_MONARCH_STEP). Then I need to take the data beneath those headers and SUM them.

    Any ideas / solutions would be greatly appreciated.
    Attached Images Attached Images

  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. 2406 (Windows 11 23H2 64-bit)
    Posts
    81,783

    Re: Formula Help with Multiple Criteria and two data sets

    Welcome to the forum.

    There are instructions at the top of the page explaining how to attach your sample workbook (yellow banner: HOW TO ATTACH YOUR SAMPLE WORKBOOK). Screenshots are of little practical use as we cannot manipulate them.

    A good sample workbook has just 10-20 rows of representative data that has been desensitised. It also has expected results mocked up, worked examples where required, relevant cells highlighted and a few explanatory notes.
    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 Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,657

    Re: Formula Help with Multiple Criteria and two data sets

    First I thought that the "natural solution for this would be INDEX and two MATCH instructions for finding the row with Part_WO and column with NEXT_MONARCH_STEP. And next one the same but with ROUTE_STEP_NUM but then I noticed that you will need to summ all the values in between the found steps. So probably a more complicated solution would be needed. As already suggested - to help you with that, wold be nice to have a sample spreadsheet not the image.
    Best Regards,

    Kaper

  4. #4
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,657

    Re: Formula Help with Multiple Criteria and two data sets

    PS. I'm writing it as separete post, not editing previous one, to make it better visible.

    Sample solutions in sample file:

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    or (some may find it easier to read, but it contains volatile function wtich could - if copied in many cells - slow down a spreadsheet)
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files

  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. 2406 (Windows 11 23H2 64-bit)
    Posts
    81,783

    Re: Formula Help with Multiple Criteria and two data sets

    Here's another option (based on Kaper's sample workbook):

    =LET(f,FILTER(Sheet2!B3:N5,Sheet2!A3:A5=B2),SUMPRODUCT(f*(Sheet2!B2:N2>=O2)*(Sheet2!B2:N2<=P2)))

  6. #6
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,657

    Re: Formula Help with Multiple Criteria and two data sets

    Ali, I don't think this formula will work for OP, because she/he declares that her/his version of Excel is 2016 (joined recently so probably it's valid information)

  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. 2406 (Windows 11 23H2 64-bit)
    Posts
    81,783

    Re: Formula Help with Multiple Criteria and two data sets

    Mmm. Didn't notice that! Never mind - it's there for anyone else to use.

+ 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. SUMIFS Formula with multiple sets of criteria
    By Lighty692 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-12-2023, 10:57 AM
  2. Summing by reference to multiple sum ranges and criteria sets
    By OttimoMassimo in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-16-2018, 10:58 AM
  3. Working with large data sets and multiple criteria
    By Sean Thomas in forum Excel General
    Replies: 1
    Last Post: 12-06-2017, 02:12 PM
  4. Counting Two Sets of Criteria Between Multiple Spreadsheets
    By anl06010 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 02-27-2017, 07:18 AM
  5. COUNTIF with 2 different sets of multiple criteria?
    By itsmickeymickey in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-18-2014, 10:52 AM
  6. COUNTIF with 2 different sets of multiple criteria?
    By itsmickeymickey in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-18-2014, 10:13 AM
  7. Counting data sets based on multiple criteria
    By hjb0802 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 04-29-2010, 10:47 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