+ Reply to Thread
Results 1 to 3 of 3

how to combine index, match and IF

  1. #1
    Forum Contributor
    Join Date
    02-28-2013
    Location
    NY, USA
    MS-Off Ver
    Excel 2019
    Posts
    101

    how to combine index, match and IF

    I have two lists

    List 1 lists the subject IDs and the number of days that subjects stay in the hospital.
    List 2 lists the subject IDs and days of subjects that have blood drawn.

    I want to keep the days that subjects have their blood drawn inside the hospital but assign "0" to the days when subjects have their blood drawn outside the hospital.

    See example in the attachment.

    I assume a combination of INDEX, MATCH and IF may give me the answer but have failed to do it - use INDEX and MATCH to match the subject IDs, then use IF to compare the days to the criteria in list 1.


    Any help?
    Attached Files Attached Files

  2. #2
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.95 for Mac MS 365
    Posts
    8,684

    Re: how to combine index, match and IF

    try this... =IF(VLOOKUP(F2,$B$2:$C$311,2,FALSE)>=G2,G2,0) in H2 dragged down.
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

  3. #3
    Forum Contributor
    Join Date
    02-28-2013
    Location
    NY, USA
    MS-Off Ver
    Excel 2019
    Posts
    101

    Re: how to combine index, match and IF

    Awesome !!

+ 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] Combine If with Index Match
    By Perk1961 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-19-2019, 12:54 PM
  2. Combine SUM, INDEX and MATCH
    By abrj in forum Excel General
    Replies: 7
    Last Post: 12-14-2018, 02:56 PM
  3. Combine index match and sumproduct
    By Esrei in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-25-2013, 08:08 AM
  4. [SOLVED] How to combine SUMIF, INDEX and MATCH
    By BeachRock in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-28-2013, 04:58 PM
  5. How Do I Combine OFFSET With INDEX MATCH
    By joconnor125 in forum Excel General
    Replies: 8
    Last Post: 06-15-2012, 04:47 AM
  6. [SOLVED] Combine MATCH and INDEX
    By SubwAy in forum Excel General
    Replies: 13
    Last Post: 05-31-2012, 11:53 AM
  7. How to combine the INDEX and MATCH functions?
    By Anna A in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-25-2010, 03:47 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