+ Reply to Thread
Results 1 to 3 of 3

Deleting duplicates - older solution edge case

  1. #1
    Registered User
    Join Date
    11-04-2016
    Location
    California, US
    MS-Off Ver
    2016
    Posts
    3

    Deleting duplicates - older solution edge case

    Hi,

    This is in reference to an older thread:
    http://www.excelforum.com/excel-gene...ne-column.html

    I have found an edge case with the macro in post #3. The board will not allow me to add to the existing thread (because it's closed?)

    If you run the macro on a sheet where there are no duplicate values in column B, then you get an error...
    Run-time error '1004': No cells were found.

    The macro is unable to complete, and the result is that all row in column B are hidden and you can see the column used for the scratch work off to the right. Unfiltering the column to the right, and deleting it, brings everything back.

    Ideally there would be a message that tells you no duplicates were found, and the macro would complete successfully.

    Thank you for help in advance!

  2. #2
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,407

    Re: Deleting duplicates - older solution edge case

    .
    Please Login or Register  to view this content.

    Here, addiing "On Error Resume Next" allows the code to run without issue on a blank worksheet.

  3. #3
    Registered User
    Join Date
    11-04-2016
    Location
    California, US
    MS-Off Ver
    2016
    Posts
    3

    Re: Deleting duplicates - older solution edge case

    That seems to have fixed it! Thank you for your quick response!

+ 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. Deleting duplicates in case of two columns
    By eziovegeta in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-25-2016, 07:22 AM
  2. Replies: 1
    Last Post: 03-30-2016, 05:45 PM
  3. how to find the forward edge and aft edge for given coordinates
    By naderassaleh in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 03-08-2014, 02:16 PM
  4. I need to delete duplicates with older information in
    By jessicaoshea in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-22-2013, 05:46 AM
  5. Delete duplicates with lower case and upper case taken into account?
    By Tinwelende in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 06-17-2013, 11:35 AM
  6. [SOLVED] Deleting files in a subfolder with dates older than 5 days
    By LeapingLizard in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-01-2012, 11:51 AM
  7. [SOLVED] Deleting rows older than current date and inserting a new row
    By Dan E. in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-14-2005, 11:20 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