+ Reply to Thread
Results 1 to 3 of 3

Macro to find data in column

  1. #1
    Registered User
    Join Date
    11-17-2010
    Location
    London, England
    MS-Off Ver
    Excel 2000/2003/2007
    Posts
    6

    Macro to find data in column

    I have set up a macro to find a particular number in a column:
    Please Login or Register  to view this content.
    This works well, but I was looking for some code to find duplicates as well so tried this:

    Please Login or Register  to view this content.
    As my worksheet is password protected, this didn't work without
    Please Login or Register  to view this content.
    and
    Please Login or Register  to view this content.
    etc., which made the whole thing slower than it is. It's pretty rubbish code anyway. The first one does not find duplicates but works well.

    The second one will come up with with error message 1004 ("You cannot use this command on a protected sheet" etc.) as long as
    Please Login or Register  to view this content.
    etc. isn't included.

    In Tools>Protection>Protect Sheet, I have allowed users to use AutoFilter, so I don't know what the problem is and perhaps there is some better code for this anyway.

  2. #2
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Macro to find data in column

    meridius10,

    Could try something like this instead:
    Please Login or Register  to view this content.


    Hope that helps,
    ~tigeravatar

  3. #3
    Registered User
    Join Date
    11-17-2010
    Location
    London, England
    MS-Off Ver
    Excel 2000/2003/2007
    Posts
    6

    Smile Re: Macro to find data in column

    Brilliant - that's surpassed what I was after.

    Now I must look at your code and see how I can approach a problem like this in a better way next time.

+ 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