Get Dynamic Extraction from Column B to Column G

abuharvey

New Member
Joined
Mar 7, 2015
Messages
32
Office Version
  1. 365
Dear Genius ........


I'm Enter the bunch of names (long list ) in Column B that will be Repeated names, What i want in Column G i
need to get unique names to be displayed without repeating .... Dynamically and Automatically


Thanks in advance
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
I used the Macro recorder to copy and paste to column G, then used the Remove Duplicates function in Excel. I then cleaned up the code just a bit. So probably not the most efficient way to do this, but it works!

Code:
Sub Macro3()


    Columns("B:B").Copy
    Columns("G:G").Select
    ActiveSheet.Paste
    Application.CutCopyMode = False
    ActiveSheet.Range("$G:$G").RemoveDuplicates Columns:=1, Header:=xlYes
    
End Sub
 
Upvote 0
Hello Abuharvey,

Further to 00jaggy's post, using AdvancedFilter can reduce the process to one line of code as follows:-

Code:
Sub Uniques()

Range("B2", Range("B" & Rows.Count).End(xlUp)).AdvancedFilter 2, , [G2], True

End Sub

This code assumes that you already have headings in B1 and G1.

Alternatively you can use the inbuilt AdvancedFilter function.

I hope that this helps.

Cheerio,
vcoolio.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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