How to create a summary list?

tkroper

Active Member
Joined
Feb 2, 2007
Messages
255
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.
 

Some videos you may like

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)

Yogi Anand

MrExcel MVP
Joined
Mar 12, 2002
Messages
11,454
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
Joined
Feb 2, 2007
Messages
255
Wow, Yogi...that looks like that does the trick. So is this some sort of an add-in or something?
 

PaddyD

MrExcel MVP
Joined
May 1, 2002
Messages
14,234
"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
Joined
Feb 2, 2007
Messages
255

ADVERTISEMENT

"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!
 

PaddyD

MrExcel MVP
Joined
May 1, 2002
Messages
14,234
"...it works perfectly"

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

tkroper

Active Member
Joined
Feb 2, 2007
Messages
255

ADVERTISEMENT

True! :rolleyes:

Thanks again PaddyD!
 

Guanjin Peter

Active Member
Joined
May 21, 2008
Messages
429
if you prefer a shorter method (without using vba formulas), let me know. One of Jindon's code cover this.
 

tkroper

Active Member
Joined
Feb 2, 2007
Messages
255
Sure, I'd be interested to see your solution. Thank you Peter!
 

Watch MrExcel Video

Forum statistics

Threads
1,122,521
Messages
5,596,652
Members
414,083
Latest member
Mrsash

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?

Disable AdBlock

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
Top