+ Reply to Thread
Results 1 to 4 of 4

On error go to next find requirement

  1. #1
    Registered User
    Join Date
    05-11-2011
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2016
    Posts
    6

    On error go to next find requirement

    Good Morning

    I'm having difficulties getting an "on error go to next" clause working in my fairly simple code:

    Please Login or Register  to view this content.

    Essentially I want to find selected texts (that are headings) and copy and paste them over to the right and then delete what is not needed. However some of the above texts will not be available and therefore an error would occur. When the error occurs (if it does) I want it to move onto the next find selected text until all available ones have been found.

    Hope this makes sense and hoping someone can assist with me, greatly appreciate it as always

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: On error go to next find requirement

    Try this.
    Please Login or Register  to view this content.
    If posting code please use code tags, see here.

  3. #3
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: On error go to next find requirement

    try this instead
    Please Login or Register  to view this content.
    ps you probably don't need after:activecell in the code since your using cells.find anyway
    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  4. #4
    Registered User
    Join Date
    05-11-2011
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2016
    Posts
    6

    Re: On error go to next find requirement

    Quote Originally Posted by Norie View Post
    Try this.

    Quote Originally Posted by humdingaling View Post
    try this instead
    ps you probably don't need after:activecell in the code since your using cells.find anyway

    Thank you both. Both worked exactly as i needed to. Thanks for the thoughts as well Humdingaling on doubling up on code, definitely need to clean up on that.

+ 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. I want to get COUNTIF and then do SUM for my requirement - Reg.
    By bala04msw in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-21-2016, 03:56 AM
  2. VBA for Error message to cancel a macro if requirement is unmet
    By xlislovexlislife in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-07-2015, 03:20 AM
  3. if minimum requirement isn't met
    By kieranoduill in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-21-2014, 07:06 PM
  4. [SOLVED] Error in function Compile error: Can't find project or library
    By Motario1 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 12-12-2013, 02:20 AM
  5. Adding to a requirement....
    By sumospim in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-30-2013, 12:21 AM
  6. [SOLVED] Compile Error: Can't find project or library (1 computer has the error, another does not?)
    By jonvanwyk in forum Excel Programming / VBA / Macros
    Replies: 34
    Last Post: 06-28-2012, 12:09 PM
  7. if until requirement met
    By stefan via OfficeKB.com in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 07-28-2005, 03:05 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