+ Reply to Thread
Results 1 to 6 of 6

INDEX MATCH based on two Field Conditions

  1. #1
    Registered User
    Join Date
    07-02-2013
    Location
    Pakistan
    MS-Off Ver
    Excel 365
    Posts
    51

    Question INDEX MATCH based on two Field Conditions

    I'm looking for some solution where INDEX MAtch find the output of my keyword based on a condition.
    I'm having list of city names with change values in front for each city. In my second sheet i'm calling the value to give me value for City XYZ if the district is ABC.
    Currently I'm using " =INDEX(Sheet1!$D$3:$D$13,MATCH(C3,Sheet1!$C$3:$C$13))"
    But the problem is that it pick first come city value.

    For Exacmple: In my BASE sheet I've Jordan three times under different Districts and each times its value is changed. When i call it from my data entry sheet it picks up the first value and do it again whenever the word "Jordan" comes whereas the value is change for another "JORDAN"

    Attached Sheet might clear the idea further.


    Excel issue.png

    The Red Color shows incorrect values when compare to table 1 at left side
    Attached Files Attached Files
    Last edited by naveeddil; 11-30-2015 at 01:27 AM. Reason: soem further Clarification

  2. #2
    Forum Expert NeedForExcel's Avatar
    Join Date
    03-16-2013
    Location
    Pune, India
    MS-Off Ver
    Excel 2016:2019, MS 365
    Posts
    3,873

    Re: INDEX MATCH based on two Field Conditions

    Try this

    =INDEX(BASE!$D$4:$D$14,MATCH(1,(B3=BASE!$B$4:$B$14)*(C3=BASE!$C$4:$C$14),0))

    or

    =VLOOKUP(B3&C3,CHOOSE({1,2},BASE!$B$4:$B$14&BASE!$C$4:$C$14,BASE!$D$4:$D$14),2,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.
    Last edited by NeedForExcel; 11-30-2015 at 01:50 AM.
    Cheers!
    Deep Dave

  3. #3
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,612

    Re: INDEX MATCH based on two Field Conditions

    and also:
    Please Login or Register  to view this content.
    *edit: this is an array formula:
    Confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER.
    You will know the array is active when you see 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.
    Last edited by protonLeah; 11-30-2015 at 04:15 PM. Reason: instructions for entering array formulas
    Ben Van Johnson

  4. #4
    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
    52,938

    Re: INDEX MATCH based on two Field Conditions

    Ben, you forgot to indicate that formula requires CSE
    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

  5. #5
    Registered User
    Join Date
    07-02-2013
    Location
    Pakistan
    MS-Off Ver
    Excel 365
    Posts
    51

    Re: INDEX MATCH based on two Field Conditions

    Dear Ben,
    Thanks as It worked perfectly


    Dear Ford,
    Can you please elaborate the CSE please

  6. #6
    Registered User
    Join Date
    07-02-2013
    Location
    Pakistan
    MS-Off Ver
    Excel 365
    Posts
    51

    Re: INDEX MATCH based on two Field Conditions

    Those Coming later and need detail of this function should refer to http://excelsemipro.com/2011/01/inde...gain-in-excel/ for further details

+ 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. Replies: 2
    Last Post: 12-18-2014, 09:52 AM
  2. [SOLVED] INDEX MATCH - To return all rows based on multiple conditions ("",SetA)
    By Dahlia in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 01-17-2014, 05:10 AM
  3. [SOLVED] Index and Match on 3 conditions
    By shiftyspina in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 07-17-2013, 11:56 PM
  4. Add Conditions in Index-Match
    By foncesa in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-01-2013, 01:21 AM
  5. [SOLVED] Index and match based off of top 5 list for a specific field in a filtered column
    By ScottBeatty in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-27-2013, 04:37 PM
  6. Replies: 13
    Last Post: 12-13-2012, 11:44 AM
  7. INDEX/MATCH/MATCH (2 Conditions for Column #)
    By ron2k_1 in forum Excel General
    Replies: 4
    Last Post: 02-23-2011, 03:11 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