You are here:

Excel/list of unique values from range

Advertisement


Question
QUESTION: Hi Bob, I am building a Stock trading tool and need some help.

Columns A:M contain stock symbols that are 1 to 5 letters in length such as "A" for Agilent Technologies and "CMSCA" for Comcast Corp.    I want to make a SINGLE LIST in Column P that contains all of the UNIQUE symbols from the A:M range  (some symbols will be duplicates ).   

How can I find each unique symbol from A:M range and drop them into ONE SINGLE LIST in Column P?  (Would be nice to avoid CSE formula if at all possible for sake of faster calc times.)

Thanks Bob!

ANSWER: easiest without using VBA or non-CSE is to do it manually (not formula-based...that would be CSE)
Copy Each column to P and you'll have duplicates. Then select column P and from the Data tab, click "Remove duplicates"

---------- FOLLOW-UP ----------

QUESTION: Thanks Bob.  I will try that.   However, let's assume that I do need to use a CSE formula to make my situation work better automatically (if a manual effort doesn't seem to work out),  what CSE formula combo and process would I need to use to make my Range into Single List project work well?  Thanks again Bob.

Nathan

Answer
Sorry this took so long.
a CSE formula looks to be way too complicated.
Running this procedure is quite fast:

Sub UniqueP()
Dim n As Integer, i As Integer
   On Error Resume Next
   i = 1
   Columns(16).Clear
   For Each thing In Range("A1").CurrentRegion
       If thing.Column < 14 Then
         n = 0
         n = Application.Match(thing.Value, Columns(16), 0)
         If n = 0 Then
         Cells(i, 16).Value = thing
         i = i + 1
         End If
       End If
   Next
End Sub
About Excel
This topic answers questions related to Microsoft Excel spreadsheet (or workbook) stand-alone or Mircrosoft Office Excel including Excel 2003, Excel 2007, Office 2000, and Office XP. You can get Excel help on Excel formulas(or functions), Excell macros, charting in Excel, advanced features, and the general use of Excel. This does not provide a general Excel tutorial nor the basics of using a spreadsheet. It provides specific answers to using Microsoft Excel only. If you do not see your Excel question answered in this area then please ask an Excel question here

Excel

All Answers


Answers by Expert:


Ask Experts

Volunteer


Bob Umlas

Expertise

I`m a Microsoft Excel MVP (Most Valuable Professional) and have been since the inception of the program in 1995. I can answer every kind of Excel question except: API, Importing/exporting to other programs (powerpoint, word,...) Also check out my in-person training link at http://www.thumbtack.com/ny/new-york/excel-training/

Experience

Worked with MS Excel since version 0.99 (on the Mac!). Was contributing editor to Excellence Magazine, having written >300 articles. John Walkenbach said of me "I finally met someone who knows as much about Excel as I do."

Publications
Excellence, The Expert, Microsoft

Education/Credentials
BA in math, Hofstra University, 1965

Awards and Honors
MVP
Led sessions for the Convergence 2004-2006 seminar on Excel tips & tricks

©2016 About.com. All rights reserved.