How to remove special duplicate?

MacFil

New Member
Joined
Dec 27, 2004
Messages
6
Hi all. I'm new to Excel. I mostly work with Access. I made a search but could not find what I was looking for. I have a report in Access that I transfer to Excel. What I would like to acheive is to revove duplicate line but only some special duplicate.
Railcars 11-04-2005-3 .xls
ABCDEFGHIJ
1Railcar#CodeHeat#Std#GradeQtySchSizeLocation/Remarks
2102QI602NW85463-2QI22681/84V000040238.50
3102QI602NW85463-2QI22681/84V000040318.50
4102QI602NW85464QI22681/84V0000228.50
5
6104QI600NW86137QI21676/790000038139.00
7104QI600NW86137QI21676/790000038259.00
8
9135471QI602NW86948QI1311038CH35138.50
10135471QI602NW86948QI1311038CH35228.50
11135471QI602NW86947QI1311038CH8329.00
12135471QI602NW86947QI1311038CH8269.00
Railcars to unload Query


In this example, you have the Heat # coming up a couple time. I must say where the column Sch is where the heat is shecule under different PO.
So you have the same Heat # coming back in the same railcar.
I would like to keep only one heat out of 2 or 3 or 4..

How can it be done?

Thanks for your help.
JP
 
Just got back to my office this morning.
Change the line to
if cell = cell.offset(-1,0) then cell.entirerow.delete
That did it. Works vrey good.

Thats what I was looking for.

Thank you so much for your help.

JP
 
Upvote 0

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.

Forum statistics

Threads
1,214,883
Messages
6,122,077
Members
449,064
Latest member
MattDRT

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top