Question Excel

Jimmy

Resident Freddy
Joined
Aug 24, 2006
Messages
1,072
Evening Folks

I need some advice on excel 2003. I'm currently helping a team at work find and delete duplicates from there sheets they use, find them isn't the issue but getting rid of them in bulk is.

What we have is a workbook with about 7-8 tabs each with account numbers on, over all there is 26k accounts on the workbook, what happens is when the team needs to work an account they copy the number from the row and paste it to the bottom while leaving the the old one at the top (Retarded i know) and continue this for each account they work creating the duplicates. All i have is that the duplicates i need to delete are at the top there is also no date to say when each one was worked ant idea's on how to delete them on mas rather than go trough each one?

any help is much appricated.

Ps sorry for any shit grammer
 

Bahumat

FH is my second home
Joined
Jun 22, 2004
Messages
16,788
Tell them it's their problem for using such a retarded method.
 

Zenith.UK

Part of the furniture
Joined
Dec 20, 2008
Messages
2,913
The easy way to delete en mass would be to just delete the XLS but I think that's kind of defeating the object. :)

From what you say, they paste the most recent ones to the bottom. That means the earlier ones are the ones you want to delete/get rid of? You don't need the date, but you do need the cell location.
CTRL+F, enter the search term (account number), make sure "Seach in" is set to workbook, hit "Find All". You'll get a list in order of all the cells that contain that piece of information. Copy the last one of each sheet into a new spreadsheet. It would be easier to copy the last instance of each account number rather than delete all the other instances. Once you're sure all the account numbers are accounted for in the new spread sheet, you can ditch the original file.
 

Jimmy

Resident Freddy
Joined
Aug 24, 2006
Messages
1,072
Thanks Zenith but im trying to avoid that way as there are 26k accounts will take a while :D
 

Gahn

Resident Freddy
Joined
Jan 16, 2004
Messages
5,056
Thanks Zenith but im trying to avoid that way as there are 26k accounts will take a while :D

No matter the Tech/Software, the only way to be sure there are no Duplicates is to reiterate all rows.
Ofc that wouldn't be a real problem if you had a Relational Database behind as Database and T-Sql to write a Select, with Excel .. well .. they gonna take many coffe breaks ^^

Some1 more versed than me in Excel Vba is free to slap me in the wrist :p
 

Zenith.UK

Part of the furniture
Joined
Dec 20, 2008
Messages
2,913
I didn't have the time to type it earlier, but maybe you could get someone versed in VBA to script the search for unique account numbers and output the results to a new file.
It's beyond my easy fix, and I've not done any VBA for a number of years.
 

Jupitus

Old and short, no wonder I'm grumpy!
Staff member
Moderator
FH Subscriber
Joined
Dec 14, 2003
Messages
3,293
Clue - insert a column to the left, type 1,2,3 in descending cells in it, then autofill right down to the bottom... this will act as a sorting order column so although you don't have a date you can manage without... I'll ponder some more...
 

TdC

Trem's hunky sex love muffin
Joined
Dec 20, 2003
Messages
30,804
refuse to do it, and force them to migrate to a RDBMS. accuse them of having small willies, sleep with their wives, do anything. make them use a database. it's better. you know it. they know it.
 

dysfunction

FH is my second home
Joined
Dec 22, 2003
Messages
9,709
Put a number index in one column ie give each line a unique number.

Sort by the account number

In a new column have a formula that says:
=if(a6=a5,"duplicate","")

Filter on "duplicate"
Select visible cells alt+;
Delete the rows

Resort by the number index

Done.
 

dysfunction

FH is my second home
Joined
Dec 22, 2003
Messages
9,709
dysfunction said:
Put a number index in one column ie give each line a unique number.

Sort by the account number

In a new column have a formula that says:
=if(a6=a5,"duplicate","")

Filter on "duplicate"
Select visible cells alt+;
Delete the rows

Resort by the number index

Done.

Actually the if statement should be a5=a6 so that the very last account is not the duplicate. (Assuming column a has the account number).

Either that or sort by account and have largest index number at the top.
 

Users who are viewing this thread

Top Bottom