+ Reply to Thread
Results 1 to 3 of 3

function to pull cell information from column based on cell location

  1. #1
    Registered User
    Join Date
    06-08-2011
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    4

    function to pull cell information from column based on cell location

    Hello,

    Please bare with me, this is somewhat hard to explain.
    I wish to grab a cell value from one sheet and bring it to another based on a previous cell from the same row on the original sheet compared to the column on the second sheet.

    For instance
    Sheet 1
    A 1
    B 2
    C 3

    Sheet 2
    B Formula
    C Formula
    A Formula

    Formula should make sheet 2 look like this
    Desired Result
    B 2
    C 3
    A 1

    please also see attached excel sheet for example
    I have gotten pretty close with
    =IF(ISERROR(MATCH(A2,Sheet1!$A$2:$A$8,0)),"Missing",Sheet1!B2)
    but of course that ends up pulling
    B 1
    C 2
    A 3
    which obviously is not what we are shooting for
    Attached Files Attached Files
    Last edited by ExcelFalcon; 06-08-2011 at 04:11 PM. Reason: solved

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

    Re: function to pull cell information from column based on cell location

    =IF(ISERROR(index(Sheet1!$b$2:$b$8,MATCH(A2,Sheet1!$A$2:$A$8,0))),"Missing",Sheet1!B2)
    "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
    Registered User
    Join Date
    06-08-2011
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: function to pull cell information from column based on cell location

    Hello martindwilson,

    Thank you for posting, but I get
    B 1
    C 2
    A 3
    when i use that code, but I played with it and came up with this, thank you for the idea of using index and match
    =IFERROR(INDEX(Sheet1!$B$2:$B$8,MATCH(A2,Sheet1!$A$2:$A$8,FALSE),1),"Missing")

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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