# How to create a summary list?

#### tkroper

##### Active Member
Hi!

I have a list of unsorted codes in A1:A30. There are a total of only 5 unique codes represented, but most of the codes occur several times.

I'd like to produce a summary list in A35:A40 of each of the 5 codes represented in the range above.

Is there a formula that can be copied and pasted into A35:A40 that will search A1:A30 and return one of each code, or can this only be done using a macro?

Thank you for your help.

### Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.

#### Yogi Anand

##### MrExcel MVP
Hi Todd:

Following is a solution using UniqueVales function from MoreFunc Addin available for FREE ...
grid.xls
ABCD
1UnsortedCodeUniqueValues
2abcjklm
312345abc
4A_4A_4
5abc12345
6abc6789
7abc
8abc
9abc
10jklm
116789
1212345
13jklm
Sheet3

array formula in clls C2:C13 is ... =UNIQUEVALUES(A2:A13)

Would this work for you?

#### tkroper

##### Active Member
Wow, Yogi...that looks like that does the trick. So is this some sort of an add-in or something?

##### MrExcel MVP
"Is there a formula that can be copied and pasted into A35:A40 that will search A1:A30 and return one of each code, or can this only be done using a macro?"

Data | filter |advanced filter - unique values & copy to another location would do it, as would a formula of the form:

=INDEX(\$A\$1:\$A\$30,SMALL(IF(FREQUENCY(IF(\$A\$1:\$A\$30<>"",MATCH("~"&\$A\$1:\$A\$30,\$A\$1:\$A\$30&"",0)),ROW(\$A\$1:\$A\$30)-ROW(\$A\$1)+1),ROW(\$A\$1:\$A\$30)-ROW(\$A\$1)+1),ROWS(\$A\$1:A1)))

...ented with control + shift + enter

#### tkroper

##### Active Member

"Is there a formula that can be copied and pasted into A35:A40 that will search A1:A30 and return one of each code, or can this only be done using a macro?"

Data | filter |advanced filter - unique values & copy to another location would do it, as would a formula of the form:

=INDEX(\$A\$1:\$A\$30,SMALL(IF(FREQUENCY(IF(\$A\$1:\$A\$30<>"",MATCH("~"&\$A\$1:\$A\$30,\$A\$1:\$A\$30&"",0)),ROW(\$A\$1:\$A\$30)-ROW(\$A\$1)+1),ROW(\$A\$1:\$A\$30)-ROW(\$A\$1)+1),ROWS(\$A\$1:A1)))

...ented with control + shift + enter

I've never used Data>Filter before and made a hasty attempt and didn't get it so I thought maybe it didn't even do what I was looking for and gave up on it. I'll read-up on that and try again now that I know I was heading in the right direction after all.

As for your formula, it works perfectly! I appreciate you for helping me solve another one PaddyD!

##### MrExcel MVP
"...it works perfectly"

glad to hear it. your next job is to try & work out how

True!

#### Guanjin Peter

##### Active Member
if you prefer a shorter method (without using vba formulas), let me know. One of Jindon's code cover this.

#### tkroper

##### Active Member
Sure, I'd be interested to see your solution. Thank you Peter!

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

1,167,957
Messages
5,856,511
Members
431,819
Latest member
hellosunshine

### We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

### Which adblocker are you using?

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

### Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

### Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

### Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back