+ Reply to Thread
Results 1 to 4 of 4

Help adding criteria to INDEX formula

  1. #1
    Registered User
    Join Date
    09-08-2016
    Location
    Lisboa, Portugal
    MS-Off Ver
    MS 2013
    Posts
    2

    Help adding criteria to INDEX formula

    Hi

    i came up with this formula for a DB from my work

    =IF(ISERROR(INDEX(Geral!$C$1:$L$100;SMALL(IF(Geral!$A$2:$A$100=$C$3;ROW(Geral!$A$2:$A$100));ROW(Geral!1:1));2));"";INDEX(Geral!$C$1:$L$100;SMALL(IF(Geral!$A$2:$A$100=$C$3;ROW(Geral!$A$2:$A$100));ROW(Geral!1:1));1))

    but some changes came up and i need to upgrade it!

    ATM the formula obeys to 1 search criteria in cell C3, but i need it to search for 3 criteria before returning the result.
    Already tried some changes but unsuccessful

    Can anyone give me an hand??
    Thanks alot in advance

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,720

    Re: Help adding criteria to INDEX formula

    Your first condition is this:

    Geral!$A$2:$A$100=$C$3

    but to make this into multiple conditions you would put brackets around the conditions and join them together with the *, like this:

    (Geral!$A$2:$A$100=$C$3)*(Geral!$B$2:$B$100>=$D$3)*(Geral!$B$2:$B$100<$D$3+10)

    Obviously, I'm guessing what your conditions might be.

    Hope this helps.

    Pete

  3. #3
    Registered User
    Join Date
    09-08-2016
    Location
    Lisboa, Portugal
    MS-Off Ver
    MS 2013
    Posts
    2

    Re: Help adding criteria to INDEX formula

    thanks alot Pete

    saved me alot of sleep time =P
    the new formula =IF(ISERROR(INDEX(Geral!$C$1:$L$100;SMALL(IF((Geral!$A$2:$A$100=$C$3)*(Geral!$N$2:$N$100=$E$4)*(Geral!$O$2:$O$100=$E$5);ROW(Geral!$A$2:$A$100));ROW(Geral!1:1));2));"";INDEX(Geral!$C$1:$L$100;SMALL(IF(Geral!$A$2:$A$100=$C$3;ROW(Geral!$A$2:$A$100));ROW(Geral!1:1));1))

    something new happen, if the data cell is empty the result it shows is (0), can you help me making it return a empty cell? thanks again and sorry for the trouble
    Last edited by marciofo; 09-08-2016 at 09:58 PM.

  4. #4
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,720

    Re: Help adding criteria to INDEX formula

    The easiest way is to apply a Custom Format to the cell of:

    General;;

    The two semicolons cause negative numbers and zeros to be displayed as blanks. If a negative number is a valid result for you, you can use:

    General;-General;

    Hope this helps.

    Pete

+ 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] Adding and multiple criteria into an Index
    By clowesr in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 11-08-2013, 06:03 AM
  2. [SOLVED] List box's macro: Adding index formula to Linked Cell
    By DavidRoger in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 02-28-2013, 07:33 PM
  3. List box's macro: Adding index formula to Linked Cell
    By DavidRoger in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-27-2013, 09:42 PM
  4. [SOLVED] Adding vlookup to Index + Match formula
    By batty87 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-14-2013, 11:07 AM
  5. Adding an If statement to an Index Match Formula
    By brandiemz101 in forum Excel General
    Replies: 3
    Last Post: 11-16-2011, 03:25 PM
  6. Index Formula - adding a range condition
    By Henry c in forum Excel General
    Replies: 2
    Last Post: 04-29-2010, 10:19 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