Article updated on October 26, 2007

This macro creates, in column 10, unique values from an area you previously selected. Duplicate values are deleted in the new list.


Create Macro:

  1. Click "Office button" (button at the top left side of excel)
  2. Click "Excel options"
  3. Click "Popular"
  4. Click "Show developer tab in the ribbon"
  5. Press ok!
  6. Click "Developer" tab in the ribbon
  7. Click "Macros" button
  8. Type a new name for the macro
  9. Click "Create" button
  10. Copy this:

    For Each Cell In Selection If Application.CountIf(Columns(10), Cell) = 0 Then Cells(65536, 10).End(xlUp).Offset(1, 0) = Cell

    End If

    Next Cell

  11. Paste it between Sub Macro_name() and End Sub
  12. Exit "Visual Basic"

How to use macro:

  1. Select the values you want to create a unique list from
  2. Click "Macros" in Developer tab
  3. Select and run Macro