Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6541273
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T11:05:05+00:00 2026-05-25T11:05:05+00:00

Well this is not the first time im asking these question here but I

  • 0

Well this is not the first time im asking these question here but I cannot make it over.
I have to delete the duplicate rows in a column. say from

range("A1:A30000") have to delete all the duplicate rows in these columns

I have used the previous solutions from my previous questions given by the programmers on the stackoverflow. They are working amazing but not these time.Last time I had each row of 15 columns but these time each row with 40 columns and none of the scripts working. The pc its just getting hang and sometimes taking 2 hrs thats not what i want. I have used the dictionary method as suggested by Issun,Jon,Reafidy and Doc brown even they are not working. I dont know why.

So I thought to use the advanced filters but im unable to delete the duplicate rows from vba. I dont find it on google, I see the manual one with the boxes but not the vba script even i find its not working fine.

Range("A1:A5").AdvancedFilter Action:=xlFilterInPlace, Unique:=True

What I have to do after applying that line. delete the duplicate rows now. I remember its like copy pasting but i dont remember the code well and something like

xltypeinvisble:delete

I dont remember the code well . I remember that i read on google now im unable to find it.

can anyone tell me to delete the duplicate entries using the advanced filter method ? do you think ,that rows had 40 columns each and that made my scripts to take long time and sometimes hang up?what might be the cause to it?

any other method which is faster is appreciated (probably dictionary one). I belive people say dictionary method but i dont know its not working fine may be the code error or not sure about the reason.its just getting hang up. so unable to know why, well its working fine for small data that i tested. but not with the bigger one.

any help is greatly appreciated!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T11:05:05+00:00Added an answer on May 25, 2026 at 11:05 am

    I’m not familiar with the single line command you are looking for to delete all invisible rows at once, but you can loop through the rows in the range and manually delete them.

    If this still runs too slow for you, you may want to consider adding the VBA commands to turn off screen updating and re-calculations while the macro is running.

    Sub DeleteDUpes()
        Dim ThisRange As Range
        Dim NewRange As Range
    
        Set ThisRange = Range("A1:A30000")
        ThisRange.AdvancedFilter Action:=xlFilterInPlace, Unique:=True
        ' Loop through each row from bottom up, deleting rows hidden by filter
        For thisrow = ThisRange.Rows.Count To 1 Step -1
            Set NewRange = ThisRange.Resize(1).Offset(thisrow - 1, 0)
            If NewRange.EntireRow.Hidden Then
                r.EntireRow.Delete
            End If
        Next
    End Sub
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Well, this is my first post here and really enjoying the site. I have
I hope this question is not considered too basic for this forum, but we'll
well i have this messages table with sample values like these: msg_id recipient_id read
Ok another WPF question, well I guess this is just general .NET. I have
Well basically I have this script that takes a long time to execute and
This is a really stupid question, but I need a little reassurance/assistance. I have
Well I have this MySQL stored procedure that I wrote and if I run
I am using Delphi TApplication.OnException Event to catch unhandled exceptions This works well but
This snippet works well if I try to write in a user directory but
I am using servlets for the first time but I made a lot of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.