Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Sort/Duplicate Help


Hello All,
This is what I am trying to do. I am new at this and have been trying
for a couple of weeks.
Truck # Date Checked Engine #
36481 6/28/06 3cs26898
36498 6/26/06 3cs27391
36507 7/5/06 3cs27750
36526 6/26/06 3cs28760
36526 6/28/06 3cs28760
36539 6/26/06 3cs28972
36540 7/5/06 3cs28990
36550 6/28/06 3cs28983
36552 6/26/06 3cs28920
36553 6/28/06 3cs28921
36558 7/5/06 3cs28595

I want to sort column A then include B & C (expand selection) I think
it says, then check for duplicate Truck #'s and delete or remove the
duplicate truck # row.
Hope this makes sense.
Any help would be appreicated. Thx in advance
James


--
nascarjc
------------------------------------------------------------------------
nascarjc's Profile: http://www.excelforum.com/member.php...o&userid=31002
View this thread: http://www.excelforum.com/showthread...hreadid=559639

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Sort/Duplicate Help

Sub FixData()
Dim lastrow as Long, i as Long
Range(A:C).Sort Key1:=Range("A2"), _
Order1:=xlAscending, _
Header:=xlGuess, _
OrderCustom:=1, _
MatchCase:=False, _
Orientation:=xlTopToBottom
lastrow = cells(rows.count,1).End(xlup).Row
for i = lastrow - 1 to 2 step - 1
if cells(i,1) = cells(i+1,1) then
rows(i).Delete
end if
Next
End Sub

Test it on a copy of your data.

--
Regards,
Tom Ogilvy

"nascarjc" wrote in
message ...

Hello All,
This is what I am trying to do. I am new at this and have been trying
for a couple of weeks.
Truck # Date Checked Engine #
36481 6/28/06 3cs26898
36498 6/26/06 3cs27391
36507 7/5/06 3cs27750
36526 6/26/06 3cs28760
36526 6/28/06 3cs28760
36539 6/26/06 3cs28972
36540 7/5/06 3cs28990
36550 6/28/06 3cs28983
36552 6/26/06 3cs28920
36553 6/28/06 3cs28921
36558 7/5/06 3cs28595

I want to sort column A then include B & C (expand selection) I think
it says, then check for duplicate Truck #'s and delete or remove the
duplicate truck # row.
Hope this makes sense.
Any help would be appreicated. Thx in advance
James


--
nascarjc
------------------------------------------------------------------------
nascarjc's Profile:
http://www.excelforum.com/member.php...o&userid=31002
View this thread: http://www.excelforum.com/showthread...hreadid=559639



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Sort/Duplicate Help


Hi Tom,
Thanks for the help. I will give it a try and get back to you on ho
it went.
Jame

--
nascarj
-----------------------------------------------------------------------
nascarjc's Profile: http://www.excelforum.com/member.php...fo&userid=3100
View this thread: http://www.excelforum.com/showthread.php?threadid=55963

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Sort/Duplicate Help


Hello Tom,
I tried the code for the sort and works great and I like how it does
it. One thing maybe I should have mentioned before also. When it
deletes the duplicates, it erases all the codes I have in it. The page
I am sorting and deleting the duplicates, it is copying data from
another page.
What you gave me though is great, I wish I could come up with code that
fast. Thanks for your help it is much appreicated. If you need my
codes I would gladly put it on also.
James


--
nascarjc
------------------------------------------------------------------------
nascarjc's Profile: http://www.excelforum.com/member.php...o&userid=31002
View this thread: http://www.excelforum.com/showthread...hreadid=559639

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Faster way to check and sort duplicate numbers CHW Excel Discussion (Misc queries) 2 January 11th 08 10:15 PM
FIND AND SORT DUPLICATE TEXT HERNAN Excel Discussion (Misc queries) 7 October 16th 06 07:22 PM
Automatically duplicate and sort data into seperate w.sheet Ting Excel Discussion (Misc queries) 1 June 21st 06 02:14 AM
TRYING TO SORT OR FILTER DUPLICATE DATA areezm Excel Discussion (Misc queries) 3 June 7th 06 08:49 PM
How can I sort duplicate text data in excel? TinaScheu Excel Discussion (Misc queries) 1 May 2nd 05 07:13 PM


All times are GMT +1. The time now is 09:14 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"