+ Reply to Thread
Results 1 to 5 of 5

Index Function to reference cell 2 columns and

Hybrid View

  1. #1
    Registered User
    Join Date
    09-07-2012
    Location
    UK
    MS-Off Ver
    Excel 2010
    Posts
    54

    Index Function to reference cell 2 columns and

    How can I make the index function search Column A for an Item e.g. Hospital and then return the value that is 2 columns to the left and 2 rows down? Am I best to try to use a vlookup? I'm new to the Index function and I can see the potential but struggling a bit.

  2. #2
    Forum Expert
    Join Date
    02-22-2013
    Location
    London, UK
    MS-Off Ver
    Office 365
    Posts
    1,218

    Re: Index Function to reference cell 2 columns and

    Example (within the range A1:C1000):

    =INDEX($A$1:$C$1000,MATCH("hospital",$A$1:$A$1000,0)+2,3)

  3. #3
    Registered User
    Join Date
    09-07-2012
    Location
    UK
    MS-Off Ver
    Excel 2010
    Posts
    54

    Re: Index Function to reference cell 2 columns and

    I've amended the formula to suit my needs: =INDEX(April!$A:$P,MATCH(B4,April!$A:$P,0)+2,3) but I get a N/A.

    The data I'm looking up is in column B. The data is on my "April" worksheet. The data that comes out each month is always in column A to P but can be of differing amounts, therefore I cannot assign an end row.

    Any ideas?

  4. #4
    Forum Expert
    Join Date
    02-22-2013
    Location
    London, UK
    MS-Off Ver
    Office 365
    Posts
    1,218

    Re: Index Function to reference cell 2 columns and

    Change the lookup area withing the match function to only one column, for example:

    =INDEX(April!$A:$P,MATCH(B4,April!$A:$A,0)+2,3)

    See if that works

    Applying it to the whole column may slow it down somewhat, instead of limiting it to a specific row.

  5. #5
    Registered User
    Join Date
    09-07-2012
    Location
    UK
    MS-Off Ver
    Excel 2010
    Posts
    54

    Re: Index Function to reference cell 2 columns and

    That's great. Cheeky question, but is there a way of coding the formula so that when I drag it across, the formula references the next month. I tried using a list of months and referencing them, e.g. S1 = April and putting that in the bit where April is, so =INDEX("S1"!$A:$P,MATCH(B4,"S1"!$A:$A,0)+2,3) but it doesnt work. I'm not sure this can be done when referencing worksheets.

    Also, can I automatically get the index cell reference to increase by one when I drag it across so =INDEX(April!$A:$P,MATCH(B4,April!$A:$A,0)+2,3) becomes =INDEX(April!$A:$P,MATCH(B4,April!$A:$A,0)+2,4) becomes
    =INDEX(April!$A:$P,MATCH(B4,April!$A:$A,0)+2,5) etc?

+ 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] Modify an IFERROR INDEX array function to LINK a cell to ROW reference
    By paulmacro in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 01-28-2015, 09:43 AM
  2. INDEX MATCH with Rows and Columns as reference
    By Locust in forum Excel General
    Replies: 4
    Last Post: 06-11-2014, 02:35 PM
  3. Replies: 2
    Last Post: 03-20-2009, 01:29 PM
  4. [SOLVED] INDEX function need to have col reference to be formula
    By Pierre in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-31-2006, 04:58 PM
  5. Now With Index -- IF Function Does Not Work With Cell Reference
    By Gary in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-25-2006, 09:20 PM
  6. [SOLVED] Obtaining cell reference from index function
    By MH UK in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-22-2006, 10:00 AM
  7. [SOLVED] Cell reference from previous index function
    By xadnora in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-14-2005, 05:06 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