+ Reply to Thread
Results 1 to 8 of 8

Error in range search code

  1. #1
    Registered User
    Join Date
    03-16-2004
    Posts
    65

    Error in range search code

    I'm trying to get my code to search through some information and transfer the data from one sheet to another. Trying to find out why my code isn't working. I keep getting errors...

    Here is the code I am having trouble with...
    Please Login or Register  to view this content.
    I am sure I am missing some key element to my coding but I cannot figure it out...and my eyes are going buggy now...heh. So if anyone could help troubleshoot this for me, i would be very appreciative...
    Last edited by TyeJae; 10-29-2008 at 09:36 AM.

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    It's a little difficult to check without the workbook
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    4,606
    What is this bit meant to do? It appears to find the cell after the last used cell in column A and then assign a range covering all the used cells in column A with reference to that.
    Please Login or Register  to view this content.
    Perhaps it should just be
    Please Login or Register  to view this content.
    I suggest attaching a sample workbook in any case.

  4. #4
    Registered User
    Join Date
    03-16-2004
    Posts
    65
    Here are the workbooks...
    Attached Files Attached Files
    Last edited by TyeJae; 10-29-2008 at 07:37 AM.

  5. #5
    Registered User
    Join Date
    03-16-2004
    Posts
    65
    StephenR - That did fix it, now I have a whole new mess of problems. It's entering the names multiple times and still entering the names I don't want it to enter...

    I'm lost now...

  6. #6
    Registered User
    Join Date
    03-16-2004
    Posts
    65
    OK I think I figured out the problem, but not the solution...

    Please Login or Register  to view this content.
    This code above is not correct, if exclude = thePeople Then it needs to go to the next Rng....how do I do this?

  7. #7
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    M aybe
    Please Login or Register  to view this content.

  8. #8
    Registered User
    Join Date
    03-16-2004
    Posts
    65
    Thanks Roy!!!!

    With your help I fixed the problem... I had a few things wrong with my code... Here is the final

    Please Login or Register  to view this content.
    I changed it to say if dept <> thePeople, and with your added step it works perfectly!!

    THANKS AGAIN!!!

+ 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