+ Reply to Thread
Results 1 to 2 of 2

Only Looking up a Value based on Criteria

Hybrid View

  1. #1
    Registered User
    Join Date
    05-07-2020
    Location
    WA, USA
    MS-Off Ver
    Office 365
    Posts
    1

    Only Looking up a Value based on Criteria

    I am struggling with excel to look up values based on a certain criteria. I have figured out column D, where I am looking to see if there is another circuit with the same name that had an outage in less than or equal to two second later. What I am trying in column E is to go find the the time of that outage that was on the same circuit in less than or equal to two seconds later. In my sheet with real data I am using OFFSETS because I know that in my real data I figured out the maximum number of rows down from where I am checking that an outage could occur with that criteria. I would like the formula in column E to use offsets or a range that is not the entire spreadsheet because I know I only need to look so far. Column E has my expected values but I am not able to figure out how to write an excel formula that calculates what I am trying to achieve. See attached excel test sheet.

    Thanks for the help!
    Attached Files Attached Files
    Last edited by CarlSarlsburg; 05-07-2020 at 06:59 PM.

  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,946

    Re: Only Looking up a Value based on Criteria

    This (probably) a more efficient way to determine Y/N in D....
    =IF(B3="","no",IFERROR(IF(INDEX(C3:$C$12,MATCH(B2,B3:$B$12,0))-C2<=2,"yes","no"),"no"))
    If you need to go beyond row 12, adjust the $12 parts

    For col E, try this...
    =IF(OR(B3="",D2="no"),"NA",IFERROR(INDEX(C3:$C$12,MATCH(B2,B3:$B$12,0)),"NA"))
    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

+ 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] Values based on multiple criteria including grouped criteria
    By adsako in forum Excel Formulas & Functions
    Replies: 18
    Last Post: 03-21-2020, 01:24 PM
  2. Replies: 4
    Last Post: 09-02-2019, 04:14 PM
  3. VBA Macro Dividing Values Based upon Matching Criteria and Description Criteria
    By pvsvprasad in forum Excel Programming / VBA / Macros
    Replies: 18
    Last Post: 09-18-2016, 12:39 PM
  4. Replies: 0
    Last Post: 05-02-2016, 07:59 AM
  5. Replies: 2
    Last Post: 10-10-2015, 02:22 AM
  6. Replies: 4
    Last Post: 01-08-2013, 12:37 PM
  7. MACROS: Sort by multiple criteria - Create tabs based off of criteria
    By svineyard in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-21-2009, 10:48 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