+ Reply to Thread
Results 1 to 6 of 6

Index(a column with a header name XXX), then match a value

  1. #1
    Registered User
    Join Date
    08-06-2011
    Location
    kano,Nigeria
    MS-Off Ver
    Excel 2007, 2010 ,2013
    Posts
    32

    Index(a column with a header name XXX), then match a value

    lets say i have the following sheet1 with the following values
    A B C D E
    1 Code English Science Music Sport
    2 aaa 23 56 32 89
    3 bbb 33 66 42 99
    4 ccc 13 16 12 19
    5 ddd 3 6 62 79

    now on sheet2 i want to return the values in english and music colmn with formula without referring to a specific column on sheet1
    because the heading english or music can change position

    A B C D E
    1 code english music
    2 ccc 13 12
    3 bbb 33 42
    4 aaa 23 32


    the formular i wanted to write is index/match but i dont know how to frame it
    something like

    sheet2 formula in cell B4 will be

    = look at cell B1 , get the value there , then on sheet1 look at range(A1:E5)
    find the column that contains the value equal to the value on sheet2(B1)
    then return the english score of code "aaa"

    any idea please?

  2. #2
    Valued Forum Contributor
    Join Date
    05-08-2015
    Location
    Uvalde, TX
    MS-Off Ver
    2010
    Posts
    720

    Re: Index(a column with a header name XXX), then match a value

    Hi,

    You are correct. This kind of formula is INDEX/MATCH.

    Give this a try:

    Please Login or Register  to view this content.
    Hope this is helpful.

    Cheers

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

    Re: Index(a column with a header name XXX), then match a value

    Here's another one...

    Data...

    Sheet1
    A
    B
    C
    D
    E
    1
    Code
    English
    Science
    Music
    Sport
    2
    aaa
    23
    56
    32
    89
    3
    bbb
    33
    66
    42
    99
    4
    ccc
    13
    16
    12
    19
    5
    ddd
    3
    6
    62
    79


    Results...

    Sheet 2
    A
    B
    C
    1
    code
    english
    music
    2
    ccc
    13
    12
    3
    bbb
    33
    42
    4
    aaa
    23
    32


    This formula entered in B2:

    =VLOOKUP($A2,Sheet1!$A$1:$E$5,MATCH(B$1,Sheet1!$A$1:$E$1,0),0)

    Copy across to C2 then down to B4:C4.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  4. #4
    Registered User
    Join Date
    08-06-2011
    Location
    kano,Nigeria
    MS-Off Ver
    Excel 2007, 2010 ,2013
    Posts
    32

    Re: Index(a column with a header name XXX), then match a value

    Both reply from Southward and Tony worked perfectly , you all made my day , thanks and keep it up

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

    Re: Index(a column with a header name XXX), then match a value

    You're welcome. Thanks for the feedback!

  6. #6
    Valued Forum Contributor
    Join Date
    05-08-2015
    Location
    Uvalde, TX
    MS-Off Ver
    2010
    Posts
    720

    Re: Index(a column with a header name XXX), then match a value

    Glad I could be of some assistance.

    Cheers

+ 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. Helped needed to index match row header, column header, and sheet
    By vw103604 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-15-2016, 12:37 PM
  2. Replies: 3
    Last Post: 01-18-2016, 10:18 AM
  3. Using Lookup? Index match? to populate cells based on column header
    By NoExcelSkills17 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 01-15-2015, 03:50 PM
  4. [SOLVED] Need help with INDEX(), MATCH() issue over a field of data to retreive column header...
    By bbernzy in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-26-2014, 06:47 PM
  5. [SOLVED] Index & Match for multiple Column and Row to find header...
    By mr-c in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 10-31-2014, 08:24 AM
  6. Return Column Header from Index/Match function
    By del24ie in forum Excel General
    Replies: 2
    Last Post: 01-12-2012, 11:57 AM
  7. Index/Match Function to Return column header
    By djmarsh51 in forum Excel General
    Replies: 2
    Last Post: 05-07-2010, 02:10 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