Justijb

New Member
Joined
Aug 16, 2016
Messages
43
I know it may be a novice request and an even easier solution but I wanted to know what the VBA code would be to remove the duplicate in one column and its correlating data in other columns and only keep unique items. To explain:

I have a spreadsheet with 7 (A-G) columns with numbers in Column C and rows 1 - 5000. These numbers sometimes have duplicates. How do I remove the duplicates in Column C and place them in a new sheet with everything else in that row and only keep the unique numbers in Column C?

Hopefully I am explaining myself correctly. Any assistance would be very much appreciated
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
If you have numbers 1, 1, 2, 3, 4, 4, 5 in column C

Do you want the existing sheet to keep rows with 1, 2, 3, 4 and 5 and move rows with 1 and 4 to the new sheet?

On a copy of your workbook, try recording a macro where you select the entire range, then used Data->Remove Duplicates apply to column C and see if that gives a starting point.
 
Upvote 0

Forum statistics

Threads
1,214,643
Messages
6,120,702
Members
448,980
Latest member
CarlosWin

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