+ Reply to Thread
Results 1 to 34 of 34

macro highlight duplicate values

  1. #1
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    macro highlight duplicate values

    Hello to all,
    I found online this macro highlighting duplicate values:

    Please Login or Register  to view this content.

    you can a change?
    Now if this is a duplicate value is highlighted.
    The change is to add the word "duplicate" in cell C
    If not duplicate add the word "not duplicate."
    I hope I was cpmprensibile.
    A greeting,
    max_max

  2. #2
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: macro highlight duplicate values

    Hi, it's quite simple,
    Just add a line to the code, when you set the highlight to the color you use also add the value in the same row for column C
    Please Login or Register  to view this content.
    I hope you understand my short explanation, my Italian is not too good to write in
    ---
    Hans
    "IT" Always crosses your path!
    May the (vba) code be with you... if it isn't; start debugging!
    If you like my answer, Click the * below to say thank-you

  3. #3
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    Re: macro highlight duplicate values

    Hello keebellaH.
    Thank you for that answer but in point of the macro must enter your edit?
    max_max

  4. #4
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: macro highlight duplicate values

    Maybe:

    Please Login or Register  to view this content.

  5. #5
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    Re: macro highlight duplicate values

    Hello john davis h.
    the macro does not appear "duplicate or not duplicate"
    max_max

  6. #6
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: macro highlight duplicate values

    Hi max, John's code is what I meant, maybe you should attach a sample file.

  7. #7
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: macro highlight duplicate values

    Try:

    Please Login or Register  to view this content.

  8. #8
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    Re: macro highlight duplicate values

    You do not see 'duplicate not duplicate "in column C.
    max_max

  9. #9
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: macro highlight duplicate values

    What's the font color?

  10. #10
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    Re: macro highlight duplicate values

    Attaching the example.
    remove:
    'Application.ScreenUpdating = False
    'Application.ScreenUpdating = True
    To check
    max_max

    prova_duplicati.xls
    Last edited by max_max; 01-05-2016 at 06:13 PM.

  11. #11
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: macro highlight duplicate values

    Well you are deleting the sheet so you never see it.
    I don't know why you have the extra sheet added, but you delete it in the end
    Please Login or Register  to view this content.
    Remove the red line and see, but then the answer is NOT in the Foglio1

    Why the macro, you can do it with formulas

  12. #12
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: macro highlight duplicate values

    Tenta questa possibilitá
    Attached Files Attached Files

  13. #13
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,516

    Re: macro highlight duplicate values

    Is this kind of how you want it?
    Please Login or Register  to view this content.

  14. #14
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    Re: macro highlight duplicate values

    Hello keebellah,
    "duplicate duplicate" must be visible in the sheet 1. The Sheet2 should delete.

    Hello Jindon your macro is good but with more than 30,000 rows excel crashes, with my old computer that has little RAM
    max_max

  15. #15
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,516

    Re: macro highlight duplicate values

    Try the codes and use faster one
    Please Login or Register  to view this content.

  16. #16
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    Re: macro highlight duplicate values

    Hello jindon,
    The second macro "Test2" is really fast.
    Many thanks.
    You can add to "test2" also "not duplicated".
    Thanks again.
    max_max

  17. #17
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,516

    Re: macro highlight duplicate values

    Quote Originally Posted by max_max View Post
    You can add to "test2" also "not duplicated".
    change
    Please Login or Register  to view this content.
    to

    Please Login or Register  to view this content.

  18. #18
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,516

    Re: macro highlight duplicate values

    If that takes care of your original question, select Thread Tools from the menu link above and mark this thread as SOLVED.

  19. #19
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    Re: macro highlight duplicate values

    Hello jindon.
    We are almost at the end of the solution.
    Now I have added:

    total values (n)
    duplicate values (c)
    not uplicated values (d)

    is exact my change?
    Please Login or Register  to view this content.
    max_max
    Last edited by max_max; 01-06-2016 at 08:27 AM.

  20. #20
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,516

    Re: macro highlight duplicate values

    Perhaps
    Please Login or Register  to view this content.

  21. #21
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    Re: macro highlight duplicate values

    Hello jindon
    Thank you so much and I salute you from Italy.
    I hope google translator functions.
    max_max
    ---------------------------------------------------
    こんにちはjindon
    どうもありがとう、私はイタリアからあなたを敬礼。
    私は、Googleの翻訳機能を願っています。
    max_max
    ---------------------------------------------------
    Ciao jindon
    Ti ringrazio tanto e ti saluto dall'Italia.
    Spero che google traduttore funzioni.
    max_max

  22. #22
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,516

    Re: macro highlight duplicate values

    You are welcome and don't forget to mark this thread "Solved".

  23. #23
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    Re: macro highlight duplicate values

    Hello jindon.
    The macro is perfect.
    I entered the macro in a new workbook and between 2 sheets there is a hyperlink.
    I do not understand why after starting the macro this link disappears.
    I am attaching example.
    max_max

    prova_duplicati_06_01_16.xls

  24. #24
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693
    Hi to all.
    A help for change macro?
    max_max

  25. #25
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,516

    Re: macro highlight duplicate values

    Please Login or Register  to view this content.

  26. #26
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693
    Hi jiindon
    the iperlink head but "duplicate" is also in the cells
    emty
    max_max

  27. #27
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: macro highlight duplicate values

    I guess your Google translate isn't working correct.
    What are you trying to tell us?

  28. #28
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    Re: macro highlight duplicate values

    Hello,
    the hyperlink between the sheets now with the new macro works.
    Always remains the word "duplicate" although the cell A is empty.
    See attached picture.
    I hope google translator now functions.
    max_max

    Appunti01.jpg

  29. #29
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: macro highlight duplicate values

    The hyperlink was not in the first post.
    Well, you will have to add a check to stop when the cells are empty
    I'll check the prova_duplicati_06_01_16.xls file and see what I can do for you.
    I'm sure Jindon has the asnwer too
    By the way, are you using excel 2003 or earlier?

  30. #30
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: macro highlight duplicate values

    There is something strange.
    It does not ALWAYS check the empty rows.
    The way Jindon fills the arrays is fine but why it sometimes goes all the way down to row 200, I do not understand
    I'll write some code the way I would do it to see what happens

  31. #31
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    Re: macro highlight duplicate values

    Hello Keebellah
    here at home excel 2007 in my office excel 2003.
    max_max

  32. #32
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: macro highlight duplicate values

    Okay, we keep the xls files

  33. #33
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,516

    Re: macro highlight duplicate values

    max_max

    You should have uploaded the true file in the first place, otherwise you can not get the solution what you have in your mind.
    I can not read inside your brain....
    Please Login or Register  to view this content.

  34. #34
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    Re: macro highlight duplicate values

    Hello jindon,
    thanks now works well.
    Only now a change.
    The values found are displayed by your macro:
    Please Login or Register  to view this content.
    They are not exact.
    I modified the macro like this:
    Please Login or Register  to view this content.
    max_max

+ 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 Duplicate Values
    By voniom in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-18-2015, 08:48 AM
  2. Compare then highlight duplicate values
    By Hurricanefly in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-15-2015, 04:57 PM
  3. Using different colors to highlight duplicate values
    By mbonin in forum Excel General
    Replies: 3
    Last Post: 09-17-2013, 03:01 PM
  4. How to highlight duplicate values after certain condition is met
    By mstjohn1974 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 01-14-2013, 08:57 AM
  5. Highlight duplicate values
    By abibayley in forum Excel General
    Replies: 3
    Last Post: 04-23-2012, 12:03 PM
  6. Need help on how to highlight duplicate values
    By avadakedava in forum Excel General
    Replies: 3
    Last Post: 04-10-2012, 11:27 AM
  7. Highlight duplicate row values
    By Brian Tam in forum Excel General
    Replies: 5
    Last Post: 08-27-2010, 04:54 PM

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