Coming soon - Get a detailed view of why an account is flagged as spam!
view details

This post has been de-listed

It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.

3
Looking for specific technique and Stack Overflow is failing me....
Post Flair (click to view more posts with a particular flair)
Post Body

Hi, All!

Firstly - I am super stoked to see that this subreddit exists! I am new to VBA and it feels like I have to get in my time machine every time I get up visual basic. I have written a few successful scripts so far, including:

1) locate values in a column where I want all cells to be null, and once said cells have been located, delete the entire row(s) around them

2) locate nulls in a column where I need strings, and replaced said nulls with string

3) locate duplicates and remove them

now, what I am wanting to do, is a little like three but more complex. I want to search for duplicates in a column, and rather than deleting all duplicated and leaving one, I would like to write a script(s) that locates duplicates, and keeps 3, 5, 10 or 20 of the duplicate. I could have duplicates ranging from zero to 100. So I would like a dynamic option. So really, there are two needs I have here:

i) how can I remove duplicates but leave 'x' amount, rather than just 1?

ii) To make this 'dynamic', if i) is possible, I could just copy and paste the sub, substituting in various numbers. Is there instead, a user-friendly interface that I could get to pop up when the macro is ran, prompting the user to enter a number of their choosing?

i) is priority here

If possible, I can *probably* figure out ii). That would just be a something extra nice.

Any help at all, or directions to stack overflow or other websites would be very much appreciated! :)

Author
Account Strength
100%
Account Age
5 years
Verified Email
Yes
Verified Flair
No
Total Karma
18,222
Link Karma
10,468
Comment Karma
6,920
Profile updated: 6 days ago
Posts updated: 1 year ago

Subreddit

Post Details

We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
5 years ago