+ Reply to Thread
Results 1 to 9 of 9

IF and Search function issue

  1. #1
    Registered User
    Join Date
    04-15-2017
    Location
    Belgium
    MS-Off Ver
    2010
    Posts
    15

    IF and Search function issue

    Ok. I need your help guys , and girls.

    =IF(A4>1;(IF(SEARCH("BP";INPUT!BF1;1);"PALLET"); "SHELF");"")

    This one won't work. I actually want the following...
    The search for BS is not yet in the formula.

    So I actually need
    - If you search for BP in the cell INPUT!BF1, the result should be PALLET
    - If you search for BS in the cell INPUT!BF1, the result should be SHELF
    - If the cell INPUT!BF1 is empty, the result should be a blank cell.

    Thanks all.
    Last edited by Bram84; 04-15-2017 at 01:14 PM. Reason: SOLVED

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,820

    Re: IF and Search function issue

    Try

    =IF(A4>1,IF(Input!BF1="","",IF(ISNUMBER(SEARCH("BP",Input!BF1,1)),"PALLET","SHELF")),"")

    Assumption is that BF1 contains either BP or BS

    Change "," to ";"

  3. #3
    Forum Expert gmr4evr1's Avatar
    Join Date
    11-24-2014
    Location
    Texas
    MS-Off Ver
    Office 2010 and 2007
    Posts
    3,448

    Re: IF and Search function issue

    If you are always looking in the cell Input BF1, you could use this...
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    1N73LL1G3NC3 15 7H3 4B1L17Y 70 4D4P7 70 CH4NG3 - 573PH3N H4WK1NG
    You don't have to add Rep if I have helped you out (but it would be nice), but please mark the thread as SOLVED if your issue is resolved.

    Tom

  4. #4
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: IF and Search function issue

    IF BP or BS might be inside a larger string

    =IF(INPUT!BF1<>""; IF(ISNUMBER(SEARCH("BP";INPUT!BF1));"PALLET"; IF(ISNUMBER(SEARCH("BS";INPUT!BF1)); "SHELF"; "N/A"));"")

    The "N/A" appears if BF1 has a value but it doesn't contain BP or BS
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  5. #5
    Registered User
    Join Date
    04-15-2017
    Location
    Belgium
    MS-Off Ver
    2010
    Posts
    15

    Re: IF and Search function issue

    Thx,
    But in cells where there is BP or BS, he still returns a blanco cell
    I used =IF(A4<1;IF(INPUT!BF1="";"";IF(ISNUMBER(SEARCH("BP";INPUT!BF1;1));"PALLET";"SHELF"));"")

  6. #6
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,820

    Re: IF and Search function issue

    Check .....

    =IF(A4<1;IF(INPUT!BF1="";"";IF(ISNUMBER(SEARCH("BP";INPUT!BF1;1));"PALLET";"SHELF"));"")

    Your post was A4>1

  7. #7
    Registered User
    Join Date
    04-15-2017
    Location
    Belgium
    MS-Off Ver
    2010
    Posts
    15

    Re: IF and Search function issue

    This one works almost...
    Only he there should be a check if Cell A4 had a number bigger than 1 BEFORE he starts looking. So of the cell A4 is Blanco, the result must be blanco as wel.
    Is the call A4 bigger than 1, than he should search for BS or BP

    Thx!!

    Quote Originally Posted by ChemistB View Post
    IF BP or BS might be inside a larger string

    =IF(INPUT!BF1<>""; IF(ISNUMBER(SEARCH("BP";INPUT!BF1));"PALLET"; IF(ISNUMBER(SEARCH("BS";INPUT!BF1)); "SHELF"; "N/A"));"")

    The "N/A" appears if BF1 has a value but it doesn't contain BP or BS

  8. #8
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,820

    Re: IF and Search function issue

    TRY

    =IF(OR(A4="",Input!BF1=""),"",IF(A4>1,IF(ISNUMBER(SEARCH("BP",Input!BF1,1)),"PALLET","SHELF"),""))

    blank if either A4 or BF1 are blank OR A4 <=1

  9. #9
    Registered User
    Join Date
    04-15-2017
    Location
    Belgium
    MS-Off Ver
    2010
    Posts
    15

    Re: IF and Search function issue

    Works!!
    You Rock :-)
    Thx!!

+ 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. Drop Down Search Bar issue
    By trosasco23 in forum Excel General
    Replies: 1
    Last Post: 09-09-2016, 01:21 AM
  2. If Search Issue
    By jstu9 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-05-2015, 12:58 PM
  3. Lookup Formula Issue, Search issue
    By kperitz in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 04-07-2014, 01:50 PM
  4. Replies: 1
    Last Post: 10-18-2012, 05:52 AM
  5. [SOLVED] Search and Matching issue
    By trianglet in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-26-2012, 04:11 AM
  6. [SOLVED] Issue - Search issue - by SHG
    By Vaibhav in forum Suggestions for Improvement
    Replies: 0
    Last Post: 02-09-2012, 06:29 AM
  7. VLOOKUP/Search issue
    By dabman in forum Excel General
    Replies: 9
    Last Post: 12-08-2008, 12:44 PM

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