+ Reply to Thread
Results 1 to 11 of 11

Cell lookups by adjacent column's text entry

  1. #1
    Registered User
    Join Date
    06-07-2011
    Location
    Berkeley, California
    MS-Off Ver
    Excel 2011
    Posts
    5

    Exclamation Cell lookups by adjacent column's text entry

    Here's a problem that is seriously stumping me, I've done my best to explain it thoroughly.

    I want to reproduce (in another tab) the numerical value contained in a cell on another worksheet. The thing is, the cell I need to locate can only be identified by its row number and the fact that it is next to a cell with text (that I know) in it. For example: I know that a number (that I am trying to reproduce), say 12345, is in row 8, directly to the right of the cell that says "Identify," but I don't know the column that "Identify" is in.

    On a more big-picture scope, I have a TON of columns, some of which contain text, and the next two columns (for each column containing text) display numbers (they are coded dates). The text is the name of a project phase, and the numbers are the start and end dates. I know each row that the numbers I want are in, but because the name of the phase may be in any of the columns, I can't simply refer to a specific column; I have to use some sort of lookup function.

    To clarify my problem. I am looking for the number 12345 next to the cell containing "Identify" in row 8. But, "Identify" can be in column A, B, C, ...., or AZ, and in row 9, "Identify" may show up in a different column. How do I create a function to spit out 12345? It must also be able to identify the number next to "Identify" in row 9 when I change the formula to reference row 9.

    If you can figure this out, you should probably quit your job and start an excel-based consulting firm.
    Last edited by jea876; 06-07-2011 at 08:22 PM. Reason: Change Title

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

    Re: True test for excel master

    grasshopper , masters of the forum require a sample workbook, the true path to excel enlightenment may be thus revealed to you
    "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

  3. #3
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,168

    Re: True test for excel master

    Hi jea876 and welcome to the forum,

    See he attached for your answer.

    Please Login or Register  to view this content.
    Study upon the Match and Offset functions.
    Attached Files Attached Files
    Last edited by MarvinP; 06-07-2011 at 10:16 PM.
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  4. #4
    Forum Guru
    Join Date
    05-24-2011
    Location
    India
    MS-Off Ver
    Office 2021
    Posts
    2,237

    Re: True test for excel master

    Hello,

    Assume your data is in Sheet1!A:AZ. if so try,

    Please Login or Register  to view this content.
    This is an Array Formula, must hit CONTROL+SHIFT+ENTER, not just ENTER
    Regards,
    Haseeb Avarakkan

    __________________________________
    "Feedback is the breakfast of champions"

  5. #5
    Registered User
    Join Date
    06-07-2011
    Location
    Berkeley, California
    MS-Off Ver
    Excel 2011
    Posts
    5

    Re: True test for excel master

    Thank you, hopefully that is more appropriate.

  6. #6
    Registered User
    Join Date
    06-07-2011
    Location
    Berkeley, California
    MS-Off Ver
    Excel 2011
    Posts
    5

    Re: True test for excel master

    I would, but because it is for my job, the data is confidential, no matter how impossible it would be for anyone to profit or gain insight off of a screen shot. Unfortunately, I am left to poorly describing a complex problem with words.

  7. #7
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Cell lookups by adjacent column's text entry

    Thank you. Earlier replies restored.
    Entia non sunt multiplicanda sine necessitate

  8. #8
    Forum Contributor bentleybob's Avatar
    Join Date
    02-27-2009
    Location
    Seattle, WA
    MS-Off Ver
    Excel 2010
    Posts
    644

    Re: Cell lookups by adjacent column's text entry

    If you know the row number (8) and the text it is adjacent to (I've assumed it is to the right of "Identify" in Sheet 2), then with Identify in A2 and 8 in B2, you can use:
    Please Login or Register  to view this content.

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

    Re: Cell lookups by adjacent column's text entry

    rather than =OFFSET($A8,0,MATCH("identity",$A8:$M8,0))
    i'd use =INDEX($A8:$M8,MATCH("identity",$A8:$M8,0)+1)
    but i still maintain a sample mocked up work book would be usefulle it can be gibberish just as long as identity and a number are somwhere in it and show us what is required from where

  10. #10
    Registered User
    Join Date
    06-07-2011
    Location
    Berkeley, California
    MS-Off Ver
    Excel 2011
    Posts
    5

    Re: Cell lookups by adjacent column's text entry

    @martindwilson

    Thank you! I've never had to use the Index function before, and now I'll never forget it.

  11. #11
    Registered User
    Join Date
    06-07-2011
    Location
    Berkeley, California
    MS-Off Ver
    Excel 2011
    Posts
    5

    Re: True test for excel master

    @ Haseeb A
    Thanks! That helped a lot. Index was the trick

+ 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