+ Reply to Thread
Results 1 to 3 of 3

If Search funtion = one cell over

  1. #1
    Registered User
    Join Date
    04-07-2011
    Location
    California
    MS-Off Ver
    Excel 2010
    Posts
    49

    If Search funtion = one cell over

    So I have this function I'm trying to use. Here is sample

    =IF(ISNUMBER(SEARCH(C2,B2:B400)),"OK", "Not OK")

    What I would like to do with it is replace the true part of the statement with a cell value relative to the found cell. So if the function finds the value of C2 in the range of B2:B400 instead of returning a value of OK it will returns the value of the cell to the right of the one where the value was found in the range.

    Is that possible?

    Thanks.

    -Mogul
    Last edited by imogul; 07-29-2013 at 02:50 PM.

  2. #2
    Valued Forum Contributor Harribone's Avatar
    Join Date
    02-24-2013
    Location
    Midlands, UK
    MS-Off Ver
    Excel 2019/365
    Posts
    570

    Re: If Search funtion = one cell over

    =IFERROR(VLOOKUP(C2,$B$2:$C$400,2,0),"") is what you will need.

    This looks at the 1st column of the range B2:C400 to see if a match is found to C2. If it is it returns the 2nd column (i.s the value in C). The 0 in the formula tells excel to only return a result when an exact match is found. The iferror will leave the cell blank should there be no match (if there is not match and no iferror the result would be an error).
    Say thanks, click *

  3. #3
    Registered User
    Join Date
    04-07-2011
    Location
    California
    MS-Off Ver
    Excel 2010
    Posts
    49

    Re: If Search funtion = one cell over

    Oh right. I should be using vlookup. This is what it was made for. Thanks Harribone!

+ 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] Cell Duplicating IF Funtion
    By citadel-maritime in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 02-25-2013, 07:01 AM
  2. [SOLVED] Correct syntax to have the find funtion search for whatever is in cell B2
    By geshorse in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 11-06-2012, 06:58 PM
  3. Creating an input box to use as a search funtion
    By danialw in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-13-2009, 08:51 AM
  4. [SOLVED] Funtion and Cell
    By henpat in forum Excel General
    Replies: 3
    Last Post: 11-17-2005, 04:40 AM
  5. [SOLVED] search funtion
    By steve in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-15-2005, 11:55 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