+ Reply to Thread
Results 1 to 5 of 5

If cell = value in column, get value from adjacent column

  1. #1
    Registered User
    Join Date
    08-01-2015
    Location
    Canada
    MS-Off Ver
    2010
    Posts
    6

    If cell = value in column, get value from adjacent column

    Hi, is there a way to do this without macros or VBA, I want to do the following:

    Lets say I have 2 columns A1:A9 and B1:B9 filled with values.
    In cell C1 I enter a number
    In cell D1 I want to the value of C1 to search through column A:A and if C1 matches with (lets say) A5, then I want the value of B5 to be retrieved to D1

    Example of how it may look in excel

    A1 B1 C1 (value input) D1 (value output)
    A2 B2
    A3 B3
    A4 B4
    A5 B5
    A6 B6
    A7 B7
    A8 B8
    A9 B9

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: If cell = value in column, get value from adjacent column

    Hi there... and welcome to the Excel Forum. Something like this, maybe?

    =IFERROR(INDEX($B$1:$B$9,MATCH(C1,$A$1:$A$9,0)),"No match")
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  3. #3
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,941

    Re: If cell = value in column, get value from adjacent column

    Or
    =iferror(vlookup(c1,$a$1:$b$9,2,0),"")
    Samba

    Say thanks to those who have helped you by clicking Add Reputation star.

  4. #4
    Registered User
    Join Date
    08-01-2015
    Location
    Canada
    MS-Off Ver
    2010
    Posts
    6

    Re: If cell = value in column, get value from adjacent column

    That's perfect! Thank you Glenn!

  5. #5
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: If cell = value in column, get value from adjacent column

    Glad to have helped! If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. It'd also be appreciated if you were to click the add Reputation button at the foot of any of the posts of those who helped you reach a solution.

+ 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] Clear cell in one column if adjacent cell in next column is not blank
    By wildchild69 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-15-2015, 03:54 PM
  2. [SOLVED] Set cell equal to variable cell (from set column) based on cells in adjacent column
    By alter54 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-24-2014, 01:04 PM
  3. [SOLVED] Macro to find the empty cell in a column and copy a adjacent row to another column.
    By naga in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-18-2013, 07:44 AM
  4. Replies: 5
    Last Post: 02-24-2012, 06:04 PM
  5. macro to find first blank cell in a column cut the value from left adjacent column
    By willykin in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-01-2012, 09:23 AM
  6. VBA - Populate Cell in Column F if Adjacent cell in Column E is not blank
    By DoriBeE in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 02-14-2011, 04:46 PM
  7. Replies: 6
    Last Post: 03-04-2006, 07:30 AM

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