+ Reply to Thread
Results 1 to 6 of 6

Thread: Complex IF, MATCH & INDEX functions

  1. #1
    Registered User
    Join Date
    08-18-2011
    Location
    Australia
    MS-Off Ver
    Excel 2003
    Posts
    4

    Arrow Complex IF, MATCH & INDEX functions

    Hi,

    I'm new to this forum in particular, but quite a regular on other forums....

    I got this problem and I cant seem to find a solution....

    A have a set of table of information...

    ie: to/from a b c d e
    a 0 1 2 3 4
    b 1 0 2 6 6
    c 2 2 0 7 5
    d 3 6 2 0 1

    what would be the function to make something go,

    to| from| value
    a | b| ?

    The values under to & from are a data list. What I want to do is get a function that will get the value that corresponds to that one. For example,

    to| from| value
    a | b| 1

    while keeping it dynamic, so if I change the "to" value to become "d", the value under "value" will change.

    Thanks for any help! This has been quite a challenge for me...as I've tried all sorts.
    Here's some of my failed formulas:

    IF(A8=A44:A51,INDEX('Carbon for flight'!A5:A12,MATCH(B8=A44:A51,'Carbon for flight'!A4:I12)))

    (IF(Sheet1!A:A=A2,IF(Sheet1!B:B=B2,IF(Sheet1!C:C>C2,IF(Sheet1!C:C<D2,Sheet1!D:D,0)))))

    IF(A8=A44:A51,INDEX('Carbon for flight'!A4:A11,MATCH(B8=A44:A51,'Carbon for flight'!A3:I11)))

    I just cant get it to work for me. Am I using the wrong values?
    Last edited by chaosreign; 08-21-2011 at 03:58 AM. Reason: solved

  2. #2
    Forum Guru JBeaucaire's Avatar
    Join Date
    03-21-2008
    Location
    Bakersfield, CA
    MS-Off Ver
    2010
    Posts
    19,212

    Re: Complex IF, MATCH & INDEX functions

    Where's your workbook where we can see this data? Mock up your desired results manually, no formulas, and point them out so we know what you're trying to automate.

    Click GO ADVANCED and use the paperclip icon to post up a copy of your workbook.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    “None of us is as good as all of us” - Ray Kroc
    “Actually, I *am* a rocket scientist.” - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    08-18-2011
    Location
    Australia
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Complex IF, MATCH & INDEX functions

    Quote Originally Posted by JBeaucaire View Post
    Where's your workbook where we can see this data? Mock up your desired results manually, no formulas, and point them out so we know what you're trying to automate.

    Click GO ADVANCED and use the paperclip icon to post up a copy of your workbook.
    ok..so I've attached a workbook

    At the top is the data that I'm using, and from row 17 is kinda what I want to use.

    I'm looking for a equation in D18 to search the table for the corresponding value.
    Attached Files Attached Files
    Last edited by chaosreign; 08-21-2011 at 03:39 AM. Reason: adding stuff

  4. #4
    Forum Guru JBeaucaire's Avatar
    Join Date
    03-21-2008
    Location
    Bakersfield, CA
    MS-Off Ver
    2010
    Posts
    19,212

    Re: Complex IF, MATCH & INDEX functions

    Not a complex match at all, it's a standard 2D table, so you use MATCH() functions for both the X and the Y positions in the INDEX.

    In D18: =INDEX($B$4:$I$11, MATCH($A18, $A$4:$A$11, 0), MATCH($B18, $B$3:$I$3, 0))

    In E18: =D18*C18


    Also, there's no need for a separate list for your DV list, it's the same citites as in A4:A11, just use those from your table.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    “None of us is as good as all of us” - Ray Kroc
    “Actually, I *am* a rocket scientist.” - JB (little ones count!)

  5. #5
    Registered User
    Join Date
    08-18-2011
    Location
    Australia
    MS-Off Ver
    Excel 2003
    Posts
    4

    Smile Re: Complex IF, MATCH & INDEX functions

    Quote Originally Posted by JBeaucaire View Post
    Not a complex match at all, it's a standard 2D table, so you use MATCH() functions for both the X and the Y positions in the INDEX.

    In D18: =INDEX($B$4:$I$11, MATCH($A18, $A$4:$A$11, 0), MATCH($B18, $B$3:$I$3, 0))

    In E18: =D18*C18


    Also, there's no need for a separate list for your DV list, it's the same citites as in A4:A11, just use those from your table.
    MY GOD...Thank you so much!!! you have no idea how much time I spent on this.

    Thank you so much.

  6. #6
    Forum Guru JBeaucaire's Avatar
    Join Date
    03-21-2008
    Location
    Bakersfield, CA
    MS-Off Ver
    2010
    Posts
    19,212

    Re: Complex IF, MATCH & INDEX functions

    Glad to help.

    There's no need to QUOTE my entire posts into your responses, it just clutters up the thread. Use the QUICK REPLY box down below unless you're specifically discussing something I've said further.

    If that takes care of your need, please click EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    “None of us is as good as all of us” - Ray Kroc
    “Actually, I *am* a rocket scientist.” - JB (little ones count!)

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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.2.0