» Return unique items using VBA in Microsoft Excel
VBA macro tip contributed by Erlandsen Data Consulting offering Microsoft Excel Application development, template customization, support and training solutions
CATEGORY - Custom Functions , Printing in VBA
VERSION - All Microsoft Excel Versions
You can use the macro like this to copy all the unique items from A2:A100 to cell C1 and below:
FindUniqueValues Range("A2:A100"), Range("C1")
Sub FindUniqueValues(SourceRange As Range, TargetCell As Range)
SourceRange.AdvancedFilter Action:=xlFilterCopy, _
CopyToRange:=TargetCell, Unique:=True
End Sub
Book Store:
Recommended Books:
- Learn MS Excel 2002 VBA/XML Programming
- The Guide to Understanding Financial Statements
- Accounting for Dummies
- Real Estate Loopholes: Secrets of Successful Real Estate Investing
- Cashflow Quadrant: Rich Dad's Guide to Financial Freedom
- AWAKEN THE GIANT WITHIN : HOW TO TAKE IMMEDIATE CONTROL OF YOUR MENTAL, EMOTIONAL, PHYSICAL AND FINANCIAL
No comments have been submitted.

