Consulting

Results 1 to 6 of 6

Thread: Copy to another sheet with find variable range

  1. #1
    VBAX Contributor
    Joined
    Sep 2007
    Posts
    119
    Location

    Copy to another sheet with find variable range

    Hi, I am stuck with copy entire row for the found value (X) in workbook(testbook.xls) to sheet("outputsummary") in Master summary.xls. Error as "runtime error 13, Type mismatch with error highlight at following

    Set Rng = findrange.Find(What:=MyArr(I), _
    After:=.Cells(.Cells.Count), _
    LookIn:=xlValues, _
    LookAt:=xlPart, _
    SearchOrder:=xlByRows, _
    SearchDirection:=xlNext, _
    MatchCase:=False)


    Anybody can assist to complete the error?

    Thanks
    Attached Files Attached Files

  2. #2
    VBAX Contributor
    Joined
    Sep 2007
    Posts
    119
    Location

    Copy to another sheet

    testbook.xls attached
    Attached Files Attached Files

  3. #3
    VBAX Mentor
    Joined
    Feb 2009
    Posts
    493
    Location
    I don't get an error there. I assume you are entering the column as a number as I get an error when entering a letter (your messagebox may want to make that clearer).
    -----------------------------------------
    The more you learn about something the more you know you have much to learn.

  4. #4
    VBAX Contributor
    Joined
    Sep 2007
    Posts
    119
    Location
    Rerun with number end up with run time error 1004 -Application defined or object defined error. Message meant for letter but did not work as well.

  5. #5
    VBAX Mentor
    Joined
    Feb 2009
    Posts
    493
    Location
    If you click debug on what line do you get that error?
    -----------------------------------------
    The more you learn about something the more you know you have much to learn.

  6. #6
    VBAX Contributor
    Joined
    Sep 2007
    Posts
    119
    Location
    As per my 1st question.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •