+ Reply to Thread
Results 1 to 4 of 4

Search row and pull column number involving seperate sheets

  1. #1
    Registered User
    Join Date
    06-09-2011
    Location
    Toronto
    MS-Off Ver
    Excel 2007
    Posts
    17

    Unhappy Search row and pull column number involving seperate sheets

    Hey guys, I just had a quick question regarding 2 sheets that I have.

    In the one sheet (Sheet1), I have a column (A) that lists many variables:

    VarA
    VarB
    VarC
    etc...

    In another sheet (Sheet2), I have a row that has has the exact same variables, but in a different order

    VarC, VarA, VarB, etc...

    I was wondering if I can use a formula in Sheet 1, column B to retrieve the column Letter of the matching variable in Sheet2. I was originally thinking a VLOOKUP, but got lost very quickly in how to execute it.

    Any help much appreciated, Thanks!
    Jon

  2. #2
    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,946

    Re: Search row and pull column number involving seperate sheets

    try something like this...
    =CELL("address",OFFSET(Sheet2!A1,0,MATCH(A1,Sheet2!$A$1:$C$1,0)-1))
    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

  3. #3
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,800

    Re: Search row and pull column number involving seperate sheets

    Assuming the variables are in Column A of Sheet1 and in Row 1 of Sheet2, you can use this in B1 of Sheet1:

    =LEFT(ADDRESS(1,MATCH(A1,Sheet2!$1:$1,0),4),LEN(ADDRESS(1,MATCH(A1,Sheet2!$1:$1,0),4))-1)

    Copy down to suit.

    Hope this helps.

    Pete

  4. #4
    Registered User
    Join Date
    06-09-2011
    Location
    Toronto
    MS-Off Ver
    Excel 2007
    Posts
    17

    Re: Search row and pull column number involving seperate sheets

    Thank You Both!

    I was able to retrieve it perfectly. You have saved me a massive amount of time :-)

+ 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.6.0 RC 1