+ Reply to Thread
Results 1 to 3 of 3

index match with if statement

  1. #1
    Registered User
    Join Date
    05-31-2016
    Location
    Sweden
    MS-Off Ver
    Excel 2007
    Posts
    11

    index match with if statement

    Hello,

    Ive tried many diffent index match functions together with an IF statement, but I cant make it work, any one that can help me with this?

    My data looks like this;

    A B C D
    1 Data1 Data2 Data3 Data4
    2 0 5 15 1
    3 5 819 -7 0
    4 3 7 10 0
    5 -999 10 4 0
    6 7 11 15 0
    7 0 12 4 0
    8 5 819 -999 0

    I want to use an IF statment too sort and filter my data: =IF(AND(D2=0;C2>-5;B2<>-819);A2)

    The Intension with index / match is top be able to generate a list like bellow;

    E F G H
    1 Data1 Data2 Data3 Data4
    2 3 7 10 0
    3 7 11 15 0
    4 0 12 4 0

    So with the if formula I want to filter away rows and than be able to generate a list with all true values with out rows inbetween my values.

    Thanks in advance!

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: index match with if statement

    Try:

    =IFERROR(INDEX(A$2:A$8;SMALL(IF(($D$2:$D$8=0)*($C$2:$C$8>=-5)*($B$2:$B$8<>819);ROW(A$2:A$8)-ROW(A$2)+1);ROWS($A$2:$A2)));"")

    confirmed with CTRL+SHIFT+ENTER not just ENTER and copy down and across the 4 columns.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    05-31-2016
    Location
    Sweden
    MS-Off Ver
    Excel 2007
    Posts
    11

    Re: index match with if statement

    Thanks! Worked great :-)

+ 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. If statement with INDEX MATCH
    By JPSIMMON in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 05-13-2015, 01:19 PM
  2. [SOLVED] INDEX MATCH with If statement
    By geliedee in forum Excel General
    Replies: 1
    Last Post: 04-14-2015, 07:49 AM
  3. [SOLVED] IF Statement with offset or index / match?
    By KMCurtis in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-21-2013, 12:14 PM
  4. [SOLVED] If Statement (Match/Index)
    By usmanfarok in forum Excel General
    Replies: 12
    Last Post: 09-26-2012, 04:42 AM
  5. Index & Match with IF statement
    By reggie1000 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-20-2007, 01:49 PM
  6. Using Index Match and in a conditional Statement
    By vengy in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 07-10-2007, 10:03 AM
  7. Index() & Match() or just an if() Statement?
    By JustMe602 in forum Excel General
    Replies: 6
    Last Post: 12-12-2006, 04:24 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