Listing Different Values

jeffmoseler

Well-known Member
Joined
Jul 16, 2004
Messages
540
I need code or formulas to take a column and create a list of different values. ie:

aaa
bbb
bbb
ccc
ddd
eee
eee

would look like:

aaa
bbb
ccc
ddd
eee

Is there something available for that?
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
Hi,

Try advanced filter and filter for unique records only. ( And why not record a macro while doing so.)
 
Upvote 0
jeffmoseler said:
I need code or formulas to take a column and create a list of different values. ie:

aaa
bbb
bbb
ccc
ddd
eee
eee

would look like:

aaa
bbb
ccc
ddd
eee

Is there something available for that?
Book8
ABCD
105
2ItemIdxDistinct Item List
3aaa1aaa
4bbb2bbb
5bbb ccc
6ccc3ddd
7ddd4eee
8eee5 
9eee 
Sheet1


B1 must house a 0.

B3, copied down:

=IF(A3<>"",IF(ISNA(MATCH(A3,$A$2:A2,0)),LOOKUP(9.99999999999999E+307,$B$1:B2)+1,""),"")

D1:

=LOOKUP(9.99999999999999E+307,B1:B9)

D3, copied down:

=IF(ROW()-ROW($D$3)+1<=$D$1,LOOKUP(ROW()-ROW($D$3)+1,$B$3:$B$9,$A$3:$A$9),"")
 
Upvote 0
From the excel help files, this may be what your looking for:

Select the column or click a cell in the range or list you want to filter.
On the Data menu, point to Filter, and then click Advanced Filter.
Do one of the following.
To filter the range or list in place, similar to using AutoFilter, click Filter the list, in-place.
To copy the results of the filter to another location, click Copy to another location. Then, in the Copy To box, enter a cell reference.
To select a cell, click Collapse Dialog to temporarily hide the dialog box. Select the cell on the worksheet, and then press Expand Dialog .

Select the Unique records only check box.
Note Once you filter for unique values, you can copy them to another worksheet and then archive or delete the original worksheet.
 
Upvote 0
Good Call

But here's my problem. I can't filter data from one Sheet to a location on another sheet.

I'm copying and pasting a quickbooks report into one sheet. If I create an advanced sort in that sheet it will be over written when I copy in the new data. So I need the Sort function to happen on another sheet so when the data is copied in, the other sheet will update.

I have a feeling I new VBA to do this, I am a realtive novice to VBA though.
 
Upvote 0
Re: Good Call

jeffmoseler said:
But here's my problem. I can't filter data from one Sheet to a location on another sheet.
Yes you can but you do need VBA.:)

So why not try recording a macro as Fairwinds suggested.:)
 
Upvote 0
So if advanced filter does not suit, do you need to be appending data to the second of these two sheets? or do you copy in the data at the bottom of the 1st page and Then want it to sort?

Your first example was pretty off the mark considering you are now talking filtering, copying and appending the data to a new location...

There are lots of examples of searching, finding, and copying rows from one sheet to the next, or even multiple sheets within this board, including recent posts....
 
Upvote 0
The formulas that Alain suggested works between sheets.

Also if you record a macro doing autofilter you could just continue recording while copy paste into the new sheet and delete the old data.

If it does not work, just post the recorded code here and we can tidy it up and make it more general.
 
Upvote 0

Forum statistics

Threads
1,207,254
Messages
6,077,305
Members
446,278
Latest member
hoangquan2310

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
Back
Top