+ Reply to Thread
Results 1 to 5 of 5

FIND : If Not Found Then ... Syntax

  1. #1
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,009

    FIND : If Not Found Then ... Syntax

    .
    I'm trying to get away from using LOOPS when searching through a column.

    The following macro "works" but in the current state I can only get the macro to hide the very row/s that need to remain visible.
    I've attempted various forms of NOT - IS NOTHING ... "<>" ... "=0" .... nothing has worked so far.

    What is the syntax to get the TERM FOUND rows to remain visible and hide the others ? It's going to be something real simple isn't it ? Grrrrrrrrr !!!

    Please Login or Register  to view this content.


    Also ... I just realized this macro is stopping after the first row that contains the term to be found. Hmmm ... Guess this entire macro is messed up.

    Thank You !!
    Last edited by Logit; 02-14-2020 at 05:25 PM.

  2. #2
    Valued Forum Contributor
    Join Date
    01-14-2013
    Location
    Austria
    MS-Off Ver
    2016 / 2019
    Posts
    339

    Re: FIND : If Not Found Then ... Syntax

    I don't think that this so easy. I assume that you want to find not only one occurence?
    If yes then may be that the following solution will be possible?

    Please Login or Register  to view this content.
    cheers
    guenter

  3. #3
    Forum Expert
    Join Date
    10-02-2014
    Location
    USA
    MS-Off Ver
    2016
    Posts
    1,222

    Re: FIND : If Not Found Then ... Syntax

    I think what your looking for is this:

    Please Login or Register  to view this content.
    Edit:

    Please Login or Register  to view this content.
    The above may also work as well, my first snippet was if found do x, else do y.

    Also, sounds like filter would be a better approach to this than find and hide. You could filter based on criteria and do what you like with the results.
    Last edited by Zer0Cool; 02-14-2020 at 06:25 PM.
    Ways to get help: Post clear questions, explain your overall goal, supply as much background as possible, respond to questions asked of you by those trying to help and post sample(s) files.

    "I am here to help, not do it for people" -Me

  4. #4
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,009

    Re: FIND : If Not Found Then ... Syntax

    .
    Zer0Cool : Thank you for your assistance. Sadly, I tried both of those suggestions previously and neither worked. *sigh*

    gue2013 : You macro works as desired and is blazing fast. Very much appreciated. I have a macro that is very slow but it allows
    for searching partial strings in the column (it does not use filtering). I've attempted to use the "*" in your code but not having any success. Can you guide me
    how to edit your macro so it will allow partial string filtering ?


    Thank you all so much.

  5. #5
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,009

    Re: FIND : If Not Found Then ... Syntax

    .
    Disregard .. finally have it.

    Please Login or Register  to view this content.
    Thank you all so much !

+ 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] Cannot Find Reference To A Particular Syntax
    By newbieobjectcoder in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-10-2017, 06:59 PM
  2. syntax for file not found?
    By Excel_101_Stater in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-21-2017, 06:17 PM
  3. [SOLVED] To Find every instance of TEXT copy, repeat until no Find found
    By DadaaP in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-25-2013, 02:15 PM
  4. Syntax error found in vba vlookup
    By Junior728 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-21-2005, 10:05 PM
  5. [SOLVED] Find method syntax
    By Stefi in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-27-2005, 10:05 AM
  6. Help with FIND syntax
    By PostalVote in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-26-2005, 06:05 AM
  7. [SOLVED] Macro syntax - how to find them
    By mike b in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-11-2005, 02:06 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