+ Reply to Thread
Results 1 to 10 of 10

Help - multiconditional index formula

  1. #1
    Registered User
    Join Date
    09-29-2009
    Location
    Oporto
    MS-Off Ver
    Excel 2007
    Posts
    31

    Help - multiconditional index formula

    Hi guys,

    here I'm again to claim for your help.

    The issue is that I've to do an INDEX, but I want it to be MULTICONDITIONAL.

    So, into the attached excel you can find, sheet (LIST_VALUES_TO_RETREIVE):

    The A column contains the date which I intend to consider as a condition ("> 01-12-2013" (EUROPE SETTINGS))
    The D column contains the document type which I intend to consider as a condition (only docs started by IMP, via MID function

    The column N, contains the Serial number for which I will search and retrieve the value in column U.

    Into the sheet (LIST_VALUES_TO_SEARCH), a few examples of serial numbers for which I want to have the WO nr, but this time based on other criteria’s such as DATE and TYPE of document.

    Regards
    CMP
    Attached Files Attached Files

  2. #2
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,610

    Re: Help - multiconditional index formula

    Does the attached help ?
    Attached Files Attached Files

  3. #3
    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
    53,048

    Re: Help - multiconditional index formula

    You can do this with and ARRAY INDEX/MATCH.

    If you put the date you want in sheet2 E1 and the Doc No in D1, then use this ARRAY formula in C2, copied down

    =INDEX(LIST_VALUES_TO_RETREIVE!$U$1:$U$33,MATCH($C$1&$D$1&A2,LIST_VALUES_TO_RETREIVE!$A$1:$A$33&LIST_VALUES_TO_RETREIVE!$D$1:$D$33&LIST_VALUES_TO_RETREIVE!$N$1:$N$33,0))

    ...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer. Press F2 on that cell and try again.
    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

  4. #4
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,610

    Re: Help - multiconditional index formula

    Would an array formula not be much slower than the non-array one I suggested?

    ( It looks like using array formulas is "hot" these days on the forum )

  5. #5
    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
    53,048

    Re: Help - multiconditional index formula

    Pepe, I did not look at your file (only saw you posted, after I posted), and yes you are correct, a regular formula will be quicker than an array formula.

    I dont particularly like array's I usually prefer to use helpers (I assume thats what you did too?), but this seemed to lend itself to an array formula

  6. #6
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,610

    Re: Help - multiconditional index formula

    Please Login or Register  to view this content.
    No helper needed - I thought I'd raise the point because I see many array solutions where none are needed all over the forum, solutions, which, although probably perfectly valid , could cause some problems when a large spreadsheet containing array formulas would crash, eventually loosing data.

  7. #7
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Help - multiconditional index formula

    Quote Originally Posted by Pepe Le Mokko View Post
    Would an array formula not be much slower than the non-array one I suggested?
    You can run some tests and see which formula is faster to calculate. There is calculation timer code at the link below.

    http://msdn2.microsoft.com/en-us/library/aa730921.aspx

    People seem to think that array formulas are slower to calculate as a general rule of thumb. This is not true but there are many variables to consider. The only way to know for sure is to test the formulas and see which is faster to calculate.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  8. #8
    Registered User
    Join Date
    09-29-2009
    Location
    Oporto
    MS-Off Ver
    Excel 2007
    Posts
    31

    Re: Help - multiconditional index formula

    Hi Pepe,

    thanks a lot for your help as well as the the FDibbins user!

    The formula has one small problem which is the date! If I change it, for a date not considered into the criteria, it still retrieves the result!!!

    Pls help me!!

    Regards
    CMP
    Last edited by carlosmaldonado; 02-12-2014 at 08:38 AM.

  9. #9
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,610

    Re: Help - multiconditional index formula

    Could you please give some more info and an example of what you tried?

  10. #10
    Registered User
    Join Date
    09-29-2009
    Location
    Oporto
    MS-Off Ver
    Excel 2007
    Posts
    31

    Re: Help - multiconditional index formula

    Hi Pepe,

    considering the solution you gave me, the basic test that I've done was changing the date (<"01-12-2013") for a date greater than 01-12-2013, in the line of serial number M91202FC2608, which is the first for which we intend to find the WO nr.

    Your formula bellow.
    =ÍNDEX(LIST_VALUES_TO_RETREIVE!$U$2:$U$33;SUMPRODUCT((LIST_VALUES_TO_RETREIVE!$A$2:$A$33<"01-12-2013")*(LEFT(LIST_VALUES_TO_RETREIVE!$D$2:$D$33;3)="IMP")*(LIST_VALUES_TO_RETREIVE!$N$2:$N$33=LIST_VALUES_TO_SEARCH!A2)*LIN(LIST_VALUES_TO_RETREIVE!$A$2:$A$33))-1)

    Regards
    CMP

+ 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. MultiConditional Formatting or MultiFormula?
    By easilcat in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-11-2013, 04:17 PM
  2. [SOLVED] multiconditional maximum array
    By MattRNR in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 02-27-2013, 07:11 PM
  3. Multiconditional if statement problem
    By Steffen Thomsen in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-19-2011, 02:52 AM
  4. [SOLVED] How do I set up a countif, or sumif that is multiconditional?
    By Mr. Yanni in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 06-21-2006, 04:20 AM
  5. Help with multiconditional sumif with range
    By MaxTomas in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 09-06-2005, 12:05 PM

Tags for this Thread

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