+ Reply to Thread
Results 1 to 14 of 14

Find "apple" and "orange" in one search

  1. #1
    Forum Contributor HerryMarkowitz's Avatar
    Join Date
    09-10-2012
    Location
    Europe
    MS-Off Ver
    Office 2021 - Win10
    Posts
    1,019

    Find "apple" and "orange" in one search

    Greetings,
    Open an excel file.
    Press Ctrl+F to pop up Find and Replace Dialog Box.
    How can I search "apple" and "orange" in one search ?
    Regards

    Supporting link:
    http://office.microsoft.com/en-us/ex...001230225.aspx
    Last edited by HerryMarkowitz; 04-15-2014 at 03:33 AM.
    Sub DontForgetThese()
         If Your thread includes any code Then Please use code tags...
         If Your thread has been solved Then Please mark as solved...
         If Anybody has helped to you Then Please add reputation...
    End Sub

  2. #2
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Find "apple" and "orange" in one search

    Hi,

    What precisely do you mean? You want to locate cells which contain both "Apple" and "Orange" anywhere within the string, but not just "Apple" or just "Orange"?

    Regards
    Click * below if this answer helped

    Advanced Excel Techniques: http://excelxor.com/

  3. #3
    Forum Contributor HerryMarkowitz's Avatar
    Join Date
    09-10-2012
    Location
    Europe
    MS-Off Ver
    Office 2021 - Win10
    Posts
    1,019

    Re: Find "apple" and "orange" in one search

    Hi XOR LX,
    Lets say there is an "apple" in the B5 cell, and there is an "orange" in E8 cell.
    I want to search "apple" and "orange" once.
    Result must be "apple" in the B5 cell, and "orange" in E8 cell.

    My aim is to shorten searching time...
    Once search instead of two times...

    Regards

  4. #4
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Find "apple" and "orange" in one search

    No. You cannot perform an "OR" operation using the Find and Replace tool.

    For that you would require a formula or some VBA.

    Regards

  5. #5
    Forum Contributor HerryMarkowitz's Avatar
    Join Date
    09-10-2012
    Location
    Europe
    MS-Off Ver
    Office 2021 - Win10
    Posts
    1,019

    Re: Find "apple" and "orange" in one search

    I am already using following code...
    Please Login or Register  to view this content.
    Any idea for searching apple and orange in one search ?

  6. #6
    Forum Contributor
    Join Date
    02-28-2012
    Location
    London, England
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    187

    Re: Find "apple" and "orange" in one search

    Possibly use a couple of instrings with an or statement between them, then highlight cells that match?

    Depending on size of sheet however, doubt it would be quicker! Any time saved in the finding would be outweighed by the time searching via macro and the time needed to un-highlight the cells manually once you'd 'dealt' with them.

    I think you might be on to a losing wicket here!

  7. #7
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Find "apple" and "orange" in one search

    What action do you want to perform once found? For instance his will highlight the cells of the first instance of each.

    Please Login or Register  to view this content.

  8. #8
    Forum Contributor HerryMarkowitz's Avatar
    Join Date
    09-10-2012
    Location
    Europe
    MS-Off Ver
    Office 2021 - Win10
    Posts
    1,019

    Re: Find "apple" and "orange" in one search

    Hi JOHN H. DAVIS,
    Thanks for the answer.
    But I need to see results on the find and replace dialog box in order to manage it properly...

  9. #9
    Forum Contributor
    Join Date
    02-28-2012
    Location
    London, England
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    187

    Re: Find "apple" and "orange" in one search

    I think John's answer is the best you're going to get I'm afraid, the built-in Find/Replace isn't built to handle queries like that.

  10. #10
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Find "apple" and "orange" in one search

    Does this help any?

    Please Login or Register  to view this content.

  11. #11
    Forum Contributor HerryMarkowitz's Avatar
    Join Date
    09-10-2012
    Location
    Europe
    MS-Off Ver
    Office 2021 - Win10
    Posts
    1,019

    Re: Find "apple" and "orange" in one search

    Hi JOHN H. DAVIS,
    Following part of your code has an error...
    Please Login or Register  to view this content.

  12. #12
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Find "apple" and "orange" in one search

    Worked when I tested it. What is the error you're getting?

  13. #13
    Forum Contributor HerryMarkowitz's Avatar
    Join Date
    09-10-2012
    Location
    Europe
    MS-Off Ver
    Office 2021 - Win10
    Posts
    1,019

    Re: Find "apple" and "orange" in one search

    Sorry...My mistake...It is working...

    But, this solution is not exactly what I am looking for...

    But anyway thank you...

  14. #14
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Find "apple" and "orange" in one search

    Sorry, I couldn't help you further. Hope someone else can.

+ 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] Emulate Excel 97 getopenfilename "Advanced" find including "Search subfolders"
    By FORTRANguru in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-06-2014, 08:21 PM
  2. [SOLVED] If Not ActiveSheet.Range("A1").Value Like "apple" Then MsgBox "Error"
    By HerryMarkowitz in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 02-18-2014, 02:16 PM
  3. Find "Apple" in ColB, then count ColC until the next "Total" is found in ColB
    By roothog in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-08-2013, 10:30 PM
  4. Developing a "Search" or "Find" Macro/ VBA Program
    By SamBevis in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-27-2013, 09:44 PM
  5. Replies: 5
    Last Post: 06-26-2006, 09:23 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