Computing.Net > Forums > Office Software > Generate a List of Text in Excel

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Generate a List of Text in Excel

Reply to Message Icon

Name: Betty Mc Kenzie
Date: December 14, 2007 at 06:19:13 Pacific
OS: Win XP
CPU/Ram: 2.0 Gig
Product: Dell
Comment:

On worksheet 1 - I have a 2 columns and several rows of data. Column A has product names that are repeated. On worksheet 2 I want Cell A3 to show a list of the product names from worksheet 1 - but I want only one occurrence of the product name. Example:

A (Worksheet 1)
Coca Cola
Sprite
Coca Cola
Ginger
Sprite

A3 (worksheet 2)
Coca Cola
Sprite
Ginger

Is that possible in Excel?



Sponsored Link
Ads by Google

Response Number 1
Name: Bryco
Date: December 15, 2007 at 04:57:00 Pacific
Reply:

Yes with a little effort.

Select your data in Column A.
Go to: Data, Filter, Advanced Filter.
Choose: Copy to another location
Choose: Unique records only.
Select a Copy To location somewhere onto Sheet1
Click Ok
Then copy that data and paste it onto Sheet2 in A3 as desired.

This function will not allow copying to a location outside of the working sheet.

HTH
Bryan

P.S. I am using Excel 97 and perhaps your version may allow copying to another sheet directly. At this moment I don't know if MS changed that ability or not.


0

Response Number 2
Name: DerbyDad03
Date: December 15, 2007 at 13:45:52 Pacific
Reply:

Or run this code:

Sub ViewSingles()
With Sheets(1)
LastRow = .Cells(Rows.Count, "A").End(xlUp).Row
.Range("A1:A" & LastRow).Copy Destination:=Sheets(2).[A3]
End With

Worksheets("Sheet2").Range("A3").Sort _
Key1:=Worksheets("Sheet2").Columns("A")

With Sheets(2)
LastRow = .Cells(Rows.Count, "A").End(xlUp).Row
For Rw = LastRow To 4 Step -1
If .Cells(Rw, "A") = .Cells(Rw, "A").Offset(-1, 0) Then .Cells(Rw, "A").Offset(-1, 0).EntireRow.Delete
Next
End With
End Sub


0

Response Number 3
Name: Betty Mc Kenzie
Date: December 17, 2007 at 08:01:34 Pacific
Reply:

Thanks. I used the advance filter and it worked.


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Office Software Forum Home


Sponsored links

Ads by Google


Results for: Generate a List of Text in Excel

formatting email addresses in Excel www.computing.net/answers/office/formatting-email-addresses-in-excel/5083.html

Getting a summary of words in Word www.computing.net/answers/office/getting-a-summary-of-words-in-word/2432.html

Select a date from a list of Date www.computing.net/answers/office/select-a-date-from-a-list-of-date/8214.html