Solved

VBA to get unique names and list these

Posted on 2013-01-11
4
413 Views
Last Modified: 2013-01-12
Hello,

I have a spreadsheet (as attached) which has two tabs. One tab has a list of names in the F column. I would like to have a macro (VBA) which would look at column F and strip out all the unique names and list these on the second tab (Sheet 2) from A2 onwards.

Would this be possible?

Many thanks,

GISVPN
Example-1.xlsx
0
Comment
Question by:gisvpn
  • 2
4 Comments
 
LVL 29

Expert Comment

by:gowflow
ID: 38769547
Is this what you want ?

I hv draged the formula to show on the first 100 rows if you need more here is how to do it. You click on A1 and then press F2 so you go in edit mode then you press CTRL SHIFT while holding them you press ENTER this will create an array formula. Then you drag this formula from A1 to as many rows as you want.

gowflow
Example-1.xlsx
0
 

Author Comment

by:gisvpn
ID: 38769558
Hi Gowflow,

Unfortunately I need this as a VBA script as I need to do more things with it ;)

Thanks,

GISVPN
0
 
LVL 39

Accepted Solution

by:
als315 earned 500 total points
ID: 38769583
You can record macro. It will be like to:
   Columns("F:F").Select
    Selection.Copy
    Sheets("Sheet2").Select
    Columns("A:A").Select
    ActiveSheet.Paste
    Application.CutCopyMode = False
    ActiveSheet.Range("$A$1:$A$128").RemoveDuplicates Columns:=1, Header:=xlYes

Open in new window

0
 
LVL 29

Expert Comment

by:gowflow
ID: 38769626
Here you are u hv both. I surely did not know that RemoveDuplicates property exists !!! wow.
nice als315.
gowflow
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Introduction This Article briefly covers methods of calculating the NPV and IRR variants in Excel as well as the limitations in calculating and interpreting IRR results. Paraphrasing Richard Shockley, author of my favourite finance reference tex…
Introduction This Article is a follow-up to my Mappit! Addin Article (http://www.experts-exchange.com/A_2613.html), it was inspired by an email posting I made to EUSPRIG (http://www.eusprig.org/index.htm), I will briefly cover: 1) An overvie…
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now