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

It's my first time asking here (I have visited the site several times, but
Well, I'm sure this is not the first time to see this question. and
I have a rather bizarre situation, and it's not the first time I this
It's my first time here asking for your help and knowledge! I have a
I would like to apologize at first instant for asking some stupid question(well not
my first time here, title is bad i know :) Well, this is what
Sorry this is not a very well defined question, I am thinking about an
well I'm doing this homework but I'm still not viewing the fault... When I
I just realized that this piece of code works well in Firefox but not
it's i first time i'm asking here. Sorry if the answer is available already.

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.