+ Reply to Thread
Results 1 to 7 of 7

Using Index and Match Functions

  1. #1
    Registered User
    Join Date
    12-22-2014
    Location
    AZ
    MS-Off Ver
    2010
    Posts
    4

    Using Index and Match Functions

    I am trying to us the index and match functions to pull a value from a column when I specify the row the value is to be pulled from.

    Capture.PNG

    I want the value in column "C" to be displayed in "G2" when an "x" is in column "G". The "x" will specify the row in column "C" that the value is to be pulled from.

    The formula I have in "G2" is as follows:
    =IFERROR(INDEX(C9:C93,MATCH("x",G9:G93)),0)

    The problem is the value isn't put in "G2" every time an "x" is in column "G" as seen in the picture. In the picture I want the value in "G2" to be 21.1 not 8.

    Is this the route that I should be going to do what I am trying to do? or is there another way I could do this?

  2. #2
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.84 (24041420))
    Posts
    8,769

    Re: Using Index and Match Functions

    how will excel know which X in the column to use ?
    Wayne
    if my assistance has helped, and only if you wish to , there is an "* Add Reputation" on the left hand side - you can add to my reputation here

    If you have a solution to your thread - Please mark your thread solved do the following: >
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  3. #3
    Registered User
    Join Date
    12-22-2014
    Location
    AZ
    MS-Off Ver
    2010
    Posts
    4

    Re: Using Index and Match Functions

    Quote Originally Posted by etaf View Post
    how will excel know which X in the column to use ?
    The higher row number will be how excel knows which "x" to use. The formula that I currently have works half the time. If I place an "x" right below the first "x" the value will change. But if I place an "x" 3 or 4 rows down the value will not change.

  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,945

    Re: Using Index and Match Functions

    Hi, welcome to the forum

    Im a bit confused here
    I want the value in column "C" to be displayed in "G2" when an "x" is in column "G"
    So where is the X? If that is in G2, then there cannot also be a formula there as well, a cell can contain only 1 thing = entry or formula
    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
    12-22-2014
    Location
    AZ
    MS-Off Ver
    2010
    Posts
    4

    Re: Using Index and Match Functions

    Quote Originally Posted by FDibbins View Post
    Hi, welcome to the forum

    Im a bit confused here

    So where is the X? If that is in G2, then there cannot also be a formula there as well, a cell can contain only 1 thing = entry or formula
    I am not trying to put an "x" and a formula in the same cell. I would like to be able to put an "x" between "G9" and "G15". When an "x" is in one of those cells the value in the same row and column "C" will be placed in "G2". When I add another "x" in a row further down column "G" the value will change to the corresponding value in column "C".

    Does this make sense to try and do?

  6. #6
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Using Index and Match Functions

    =LOOKUP(2,1/(G9:G15="x"),C9:C15) will give the value in c for last x in g
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  7. #7
    Registered User
    Join Date
    12-22-2014
    Location
    AZ
    MS-Off Ver
    2010
    Posts
    4

    Re: Using Index and Match Functions

    Quote Originally Posted by martindwilson View Post
    =LOOKUP(2,1/(G9:G15="x"),C9:C15) will give the value in c for last x in g
    This works great!! Thank you for your help!!

+ 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. Help with index and match functions
    By romasasss in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-29-2013, 02:47 AM
  2. [SOLVED] Help with match and Index functions
    By i82 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-13-2013, 08:52 AM
  3. [SOLVED] INDEX and Match Functions
    By akbar in forum Excel General
    Replies: 5
    Last Post: 08-10-2012, 08:55 AM
  4. Help Please INDEX & MATCH functions
    By christine.golledge in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-01-2012, 06:47 PM
  5. Using Index() & Match() functions
    By Walter349 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-08-2006, 09:23 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