+ Reply to Thread
Results 1 to 7 of 7

Find Loop error

  1. #1
    Registered User
    Join Date
    09-20-2012
    Location
    New york
    MS-Off Ver
    Excel 2003
    Posts
    45

    Find Loop error

    Can anyone help me make a macro that loops through Column AB and Search for the That value in Column AC.
    if the value is not found it will move it to a sheet named "NotFoundList"

    Below is the syntax I used but had an issue with.

    Please Login or Register  to view this content.
    Moderator's note: Put code tags, please. thanks
    Last edited by vlady; 11-04-2012 at 11:41 PM. Reason: code tags

  2. #2
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Find Loop error

    your code is totally wrong, with Set Focus = Sheets("Cid").Range("AC" & X).Find........
    you make search on a cell, not on a range, the Do Until is bad positioned, attach a sample file with comments to understand better
    If solved remember to mark Thread as solved

  3. #3
    Registered User
    Join Date
    09-20-2012
    Location
    New york
    MS-Off Ver
    Excel 2003
    Posts
    45

    Re: Find Loop error

    [Here is the file for the above macroFilter1 Macro.xls

    Please use the filter 1 macro
    Attached Files Attached Files
    Last edited by Darthzo; 11-05-2012 at 12:13 AM.

  4. #4
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: Find Loop error

    Do you mean like this?
    Please Login or Register  to view this content.

  5. #5
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Find Loop error

    in the attached file no data in column AB is in column AC
    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    09-20-2012
    Location
    New york
    MS-Off Ver
    Excel 2003
    Posts
    45

    Re: Find Loop error

    It looks like both methods worked Thanks patel45 and jindon. jindon could you explain your method so next time I might be able to use it. Looks like have some elements in there I have yet to study but think will be very useful in the future.
    patel45 from what I can tell i need to make some changes to my thinking as far as how the find function works 1. Instead of including the "X" Variable I search the column for the office Variable 2. I was really running into the wall with the Nothing value for Focus didn't realize it was just that simple to fix. If there is anything else I miss please let me know thank you. P.S. I am new to the site and need help on how to mark this as solved.

  7. #7
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Find Loop error

    Forum Rules
    9. Acknowledge the responses you receive, good or bad. If your problem is solved, please say so clearly, and mark your thread as Solved: Click Thread Tools above your first post, select "Mark your thread as Solved". Or click the Edit button on your first post in the thread, Click Go Advanced, select [SOLVED] from the Prefix dropdown, then click Save Changes. If more than two days have elapsed, the Dropdown option or Edit button will not appear -- ask a moderator to mark it.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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