+ Reply to Thread
Results 1 to 9 of 9

combine "search" and "or"

  1. #1
    Registered User
    Join Date
    10-31-2012
    Location
    South Australia, Australia
    MS-Off Ver
    Excel 2016
    Posts
    49

    combine "search" and "or"

    Hi Gurus,

    Hoping you can assist with the below.

    I am trying to add the "or" function into a much larger string and it is currently returning the #Value error.

    Can you please advise if it is possible and if so, where am I getting it wrong?

    Excel 2003.

    =(SEARCH(OR("01_EA","01_AM"),$F$1490))

    Thanks in advance.

    G

  2. #2
    Forum Expert p24leclerc's Avatar
    Join Date
    07-05-2010
    Location
    Québec
    MS-Off Ver
    Excel 2021
    Posts
    2,081

    Re: combine "search" and "or"

    No, you can't use the Or in the Search function. First, you don't use the Or function properly. Second, the Search function would look for either True or False in your text instead of your desired search text.

    Try this formula instead:
    Please Login or Register  to view this content.
    A little more complex but it should work. I didn't know what you wanted as output so I put Found as result.
    Pierre Leclerc
    _______________________________________________________

    If you like the help you got,
    Click on the STAR "Add reputation" icon at the bottom.

  3. #3
    Registered User
    Join Date
    10-31-2012
    Location
    South Australia, Australia
    MS-Off Ver
    Excel 2016
    Posts
    49

    Re: combine "search" and "or"

    Hi Pierre,
    Thanks for the response. I have included an example which may shed some more light on what I am trying to achieve. I have a series of data in column A. The formula and results in column B are based on the first 5 or 6 characters of column A. I now have different combinations that will return the same results hence the "OR" question. Being very much an excel learner, I am sure there are better ways to achieve this? Would it be an option to carry out a lookup based on the first 6 characters of a cell, with the reference table as attached in the example?
    Regards,

    G
    Attached Files Attached Files

  4. #4
    Forum Expert p24leclerc's Avatar
    Join Date
    07-05-2010
    Location
    Québec
    MS-Off Ver
    Excel 2021
    Posts
    2,081

    Re: combine "search" and "or"

    Hi,
    I've put this formula in cell C4 to test it against yours.
    Please Login or Register  to view this content.
    There are some differences but you'd be able to tell if it works for you or not.

  5. #5
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,466

    Re: combine "search" and "or"

    There are difference between mine and your manual desired output, but the formula look at whatever being seen in reference table:

    B4:

    =LOOKUP(2,1/IFERROR(SEARCH(FDCTasks,A4,1),""),$E$4:$E$10)

    ...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer. Press F2 on that cell and try again.
    Quang PT

  6. #6
    Forum Expert p24leclerc's Avatar
    Join Date
    07-05-2010
    Location
    Québec
    MS-Off Ver
    Excel 2021
    Posts
    2,081

    Re: combine "search" and "or"

    I forgot to tell you I was using your reference table in cells D4:E10

  7. #7
    Forum Expert p24leclerc's Avatar
    Join Date
    07-05-2010
    Location
    Québec
    MS-Off Ver
    Excel 2021
    Posts
    2,081

    Re: combine "search" and "or"

    If the function IFERROR works in Excel 2007, then you can use this formula:
    Please Login or Register  to view this content.

  8. #8
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: combine "search" and "or"

    Try this formula in B4:B11
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Edit I missed the 2003 in your profile. This formula instead.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Last edited by FlameRetired; 11-17-2015 at 09:45 PM.
    Dave

  9. #9
    Registered User
    Join Date
    10-31-2012
    Location
    South Australia, Australia
    MS-Off Ver
    Excel 2016
    Posts
    49

    Re: combine "search" and "or"

    Works perfectly -

    Thankyou much appreciated!

+ 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. Replies: 1
    Last Post: 08-15-2014, 06:00 AM
  2. Replies: 4
    Last Post: 11-17-2013, 12:05 PM
  3. [SOLVED] How to USE """"" cells count """"" change font color
    By austin123456 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-09-2013, 06:14 AM
  4. Replies: 5
    Last Post: 10-12-2010, 06:46 AM
  5. Replies: 5
    Last Post: 06-26-2006, 09:23 PM
  6. Replies: 7
    Last Post: 05-13-2006, 05:02 PM
  7. =IF(ISERROR(SEARCH("insurance",A125,1)),"","*")
    By cynichromantique in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 03-31-2006, 02:45 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