+ Reply to Thread
Results 1 to 7 of 7

Pull the data from a table based on two criteria

  1. #1
    Registered User
    Join Date
    12-27-2016
    Location
    Chennai
    MS-Off Ver
    2010
    Posts
    15

    Pull the data from a table based on two criteria

    Hi,

    I have a table with four columns- Model, Contract, Date range from and Date range to. Now I want to search a model of a particular date in this table to know what contract it had then. Attached a sample worksheet with data table, search items and expected result.

    It would be great If some one can help me out

    Thank you,

    Vinay
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    07-12-2015
    Location
    Dubai,UAE
    MS-Off Ver
    Office 365
    Posts
    447

    Re: Pull the data from a table based on two criteria

    Try

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


    Array Entered Formula

    Enter with Ctrl+Shift+Enter

  3. #3
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,769

    Re: Pull the data from a table based on two criteria

    Try

    =INDEX($D$3:$D$14,MATCH(1,(M4>$E$3:$E$14)*(M4<$F$3:$F$14)*($C$3:$C$14=M3),0))

    Enter with Ctrl+Shift+Enter

  4. #4
    Registered User
    Join Date
    12-27-2016
    Location
    Chennai
    MS-Off Ver
    2010
    Posts
    15

    Re: Pull the data from a table based on two criteria

    Hi Chullan and John ,

    Thank you for the formula... It seems to be working well except in case When the search date fall on the day mentioned as "From" or "two". Ideally date range includes the day of "From" or "to".

    Could you please spend a little more time on this to fine tune

    Vinay
    Last edited by vinayanep; 12-27-2016 at 06:07 AM.

  5. #5
    Forum Contributor
    Join Date
    07-12-2015
    Location
    Dubai,UAE
    MS-Off Ver
    Office 365
    Posts
    447

    Re: Pull the data from a table based on two criteria

    Quote Originally Posted by vinayanep View Post
    Hi Chullan and John ,

    Thank you for the formula... It seems to be working well except in case When the search date fall on the day mentioned as "From" or "two". Ideally date range includes the day of "From" or "to".

    Could you please spend a little more time on this to fine tune

    Vinay
    Modifying Johntopley's formula:

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

  6. #6
    Registered User
    Join Date
    12-27-2016
    Location
    Chennai
    MS-Off Ver
    2010
    Posts
    15

    Re: Pull the data from a table based on two criteria

    Thank you very much Chullan and John
    It is working fine with my table

  7. #7
    Forum Contributor
    Join Date
    07-12-2015
    Location
    Dubai,UAE
    MS-Off Ver
    Office 365
    Posts
    447

    Re: Pull the data from a table based on two criteria

    Quote Originally Posted by vinayanep View Post
    Thank you very much Chullan and John
    It is working fine with my table
    Glad to have helped.

    If your problem has been solved,please make sure to Add Reputation ( Click the Small star at the bottom left of a members post) for all the members who have helped reach your solution.
    Thanks!!

+ 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] Pull data from a table based on multiple criteria - old formula trying to use AND
    By tweaver in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-12-2016, 04:37 PM
  2. [SOLVED] Pull data from another sheet based in criteria
    By shreyansgoyal in forum Excel General
    Replies: 2
    Last Post: 03-30-2015, 02:46 AM
  3. [SOLVED] Pull data from one sheet to another based on multiple criteria
    By thestalkycop in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-15-2014, 01:38 AM
  4. Pull data from one sheet to another based on criteria
    By lowrymike in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-12-2013, 12:53 PM
  5. Pull data from list based on certain criteria
    By JakeD in forum Excel General
    Replies: 1
    Last Post: 11-15-2011, 11:47 PM
  6. Pull Data based on a date criteria
    By Nolesphan30 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-01-2008, 12:22 AM
  7. Pull data from another sheet based on certain criteria
    By steve_sr2 in forum Excel General
    Replies: 1
    Last Post: 02-23-2006, 06:15 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