+ Reply to Thread
Results 1 to 5 of 5

Highlight Duplicates

Hybrid View

markusvirus Highlight Duplicates 12-24-2015, 04:25 PM
JLGWhiz Re: Highlight Duplicates 12-24-2015, 05:05 PM
Trebor76 Re: Highlight Duplicates 12-24-2015, 07:47 PM
JLGWhiz Re: Highlight Duplicates 12-24-2015, 08:43 PM
markusvirus Re: Highlight Duplicates 12-29-2015, 09:42 AM
  1. #1
    Forum Contributor
    Join Date
    10-18-2015
    Location
    manila, philippines
    MS-Off Ver
    MS Office 2010
    Posts
    186

    Highlight Duplicates

    Hi Experts,

    I am trying to copy a code for highlighting duplicate rows. For some reason, I am getting an Error "Object Required". Can somebody check on my code please? I've attached it for reference.

    Thank you!
    Attached Files Attached Files

  2. #2
    Forum Expert JLGWhiz's Avatar
    Join Date
    02-20-2011
    Location
    Florida, USA
    MS-Off Ver
    Windows 10, Excel 2013
    Posts
    2,070

    Re: Highlight Duplicates

    Quote Originally Posted by markusvirus View Post
    Hi Experts,

    I am trying to copy a code for highlighting duplicate rows. For some reason, I am getting an Error "Object Required". Can somebody check on my code please? I've attached it for reference.

    Thank you!
    Remove the word 'Set' in both places. You have the variable 'searchresult' declared as a String. When you use Set, VBA expects an Object. Also, for your rng variable, you have 'rnd' in the declarations. While it won't throw an error, you might want to fix it for sake of consistency.
    Last edited by JLGWhiz; 12-24-2015 at 05:11 PM.

  3. #3
    Forum Expert
    Join Date
    12-10-2006
    Location
    Sydney
    MS-Off Ver
    Office 365
    Posts
    3,565

    Re: Highlight Duplicates

    Hi markusvirus,

    Just change the searchresult string variable to a range like so:

    Dim searchresult As Range
    Regards,

    Robert
    ____________________________________________
    Please ensure you mark your thread as Solved once it is. Click here to see how
    If this post helps, please don't forget to say thanks by clicking the star icon in the bottom left-hand corner of my post

  4. #4
    Forum Expert JLGWhiz's Avatar
    Join Date
    02-20-2011
    Location
    Florida, USA
    MS-Off Ver
    Windows 10, Excel 2013
    Posts
    2,070

    Re: Highlight Duplicates

    Quote Originally Posted by Trebor76 View Post
    Hi markusvirus,

    Just change the searchresult string variable to a range like so:

    Dim searchresult As Range
    Regards,

    Robert
    Yep, that would probably be better, based on the rest of the code structure. I should have read the whole thing befoire.

  5. #5
    Forum Contributor
    Join Date
    10-18-2015
    Location
    manila, philippines
    MS-Off Ver
    MS Office 2010
    Posts
    186

    Re: Highlight Duplicates

    Thank you so much kind sirs. I'll get back once I test it out.

+ 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. Highlight Duplicates in Red
    By trevor2524 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-24-2013, 08:50 PM
  2. Looking for Duplicates Highlight Whole Row
    By trevor2524 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-24-2013, 04:16 PM
  3. highlight duplicates
    By dulitul19 in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 03-05-2013, 06:34 AM
  4. Highlight Duplicates
    By bopsgtir in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-17-2012, 10:17 AM
  5. Highlight duplicates if col A and B are the same but not col C
    By Hond70 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-12-2011, 05:01 AM
  6. Macro to check for duplicates and highlight duplicates
    By obc1126 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-23-2008, 09:55 PM
  7. Highlight duplicates
    By SITCFanTN in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-30-2006, 06:25 AM

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