If I have a column with values, and I want to find out what distinct values are in there (not how many - but the actual distinct values), how can I do that?
In SQL Server I would do something like
SELECT Distinct(MyColumn) FROM MyTable.
|
If I have a column with values, and I want to find out what distinct values are in there (not how many - but the actual distinct values), how can I do that? In SQL Server I would do something like
| |||||
feedback
|
This question is protected to prevent "thanks!", "me too!", or spam answers by new users. To answer it, you must have earned at least 10 reputation on this site.
|
Excel 2007: Excel 2003:
Hard way: Write a macro with the following code:
That gives you your distinct list. You may want to copy your list to another sheet first. | |||||
feedback
|
|
Simpler than you might think:
| |||||
feedback
|
|
Or you can include the filter option in a macro
| |||
|
feedback
|
|
Or (a simple crude way): In B1,
and copy down. It just copies the first occurrence of each value across (in the row that it occurs in). | ||||
|
feedback
|