?
Solved

VBA to get unique names and list these

Posted on 2013-01-11
4
Medium Priority
?
423 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 31

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 40

Accepted Solution

by:
als315 earned 2000 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 31

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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

718 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