+ Reply to Thread
Results 1 to 7 of 7

My FindNext is not working

  1. #1
    Registered User
    Join Date
    08-12-2013
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    24

    My FindNext is not working

    I am trying to find the details from two columns based on the text string in a third column from two separate excel files
    The code should search file B column C for a match as listed in column A from the code sheet (file A).
    When it finds a matching word, it then copies details from file B, column D at the correct row into file A column B and also column F to column C (file B to file A).

    It works for finding the first string, but if there is more than one entry of the same name in file B, it fails. (there is only one instance of the same name).
    Please Login or Register  to view this content.
    Last edited by tmd_63; 12-02-2013 at 11:15 AM. Reason: missed the code tags

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

    Re: My FindNext is not working

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here



    (This thread should receive no further responses until this moderation request is fulfilled, as per Forum Rule 7)


    What happens if you remove all the On Error... stuff?
    If posting code please use code tags, see here.

  3. #3
    Registered User
    Join Date
    08-12-2013
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    24

    Re: My FindNext is not working

    Nothing happens if I remove the On error stuff. it still finds only the first instance of the 'name' in the second file.

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

    Re: My FindNext is not working

    Have you tried doing this with VLOOKUP of INDEX/MATCH?

    PS Using code of course.

  5. #5
    Forum Guru Izandol's Avatar
    Join Date
    03-29-2012
    Location
    *
    MS-Off Ver
    Excel 20(03|10|13)
    Posts
    2,581

    Re: My FindNext is not working

    The argument for FindNext must be a Range object and not a row number.

  6. #6
    Registered User
    Join Date
    08-12-2013
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    24

    Re: My FindNext is not working

    is
    Please Login or Register  to view this content.
    Better??

  7. #7
    Forum Guru Izandol's Avatar
    Join Date
    03-29-2012
    Location
    *
    MS-Off Ver
    Excel 20(03|10|13)
    Posts
    2,581

    Re: My FindNext is not working

    No - it looks as if you have fgetRowNumber decalred as a number type so you may not use Set, and also FindNext only takes one argument - the range after which to start searching.

+ 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. .FindNext not working in UDF
    By magnusga in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-20-2013, 12:57 PM
  2. [SOLVED] vba .findnext gives 'nothing'
    By Maaike... in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-17-2012, 10:57 AM
  3. FindNext
    By ddbusiness in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-28-2010, 03:54 AM
  4. [SOLVED] Findnext not working
    By bjwade62 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-16-2006, 10:08 PM
  5. Findnext
    By Noemi in forum Excel General
    Replies: 1
    Last Post: 12-12-2005, 07:30 AM

Tags for this Thread

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