Yes that will work. But it doesnt omit the same entries. I also want to make this as computer-based as possible, eg an equation.
Thanks in Advanced
Main Topics
Browse All TopicsI have several results. Listed like this.
Gender
Height
Hobby
etc
in diffrent columns.
Hobby is a user-entered results. So I have many results. I would like to list them out vertically in a diffrent place and not repeat the same result so I can use countif in the future.
For Example
|Sports|Cars|Gardening|Car
And then list them out like this
Sports
Cars
Gardening
AirPlanes
I want this to be computer based as I have many results.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
RavingNun,
> Yes that will work. But it doesnt omit the same entries. I also want to make this as computer-based
> as possible, eg an equation.
As I suggested in a previous question, after doing your Paste Special, use the Advanced Filter to generate
a list of unique entries.
1) Make a column label for your list
2) Select the cells in the transposed list
3) Select Advanced Filter from the menu
4) For Action, choose copy to other location, and choose where to put the new in the copy to box. Check unique
records only
Patrick
RavingNun,
Here's an example file:
http://www.asdy88.dsl.pipe
Just press the button!
Let me know if it does what you want.
Patrick
p.s. I haven't refreshed the screen for 2 hours so this may well overlap with someone else's offerings!!
RavingNun,
Here's a corrected example file:
http://www.asdy88.dsl.pipe
This is the code for the macro:
==code starts below this==
Sub copy_eliminate_dupes()
Dim rng1 As Range
Dim rng2 As Range
Dim celle2 As Range
Set rng1 = Range([a1], [iv1].End(xlToLeft))
rng1.copy
[a3].PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:=False, Transpose:=True
Set rng2 = Range([a3], [a65536].End(xlUp))
rng2.Sort Key1:=Range("A3"), Order1:=xlAscending, Header:=xlNo, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
For Each celle2 In rng2
'MsgBox "Celle2 = " & celle2
If celle2 = celle2.Offset(-1, 0) Then
celle2.Clear
End If
Next celle2
rng2.Sort Key1:=Range("A3"), Order1:=xlAscending, Header:=xlNo, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
[a3].Select
End Sub
==code ends above this==
Hope that deletes all the dupes.
Patrick
RavingNun,
Use the corrected macro. What I now need to know is how you need it implemented for many sets of data. Perhaps you can upload your data file using one of these sites, so that we can see what needs to be done:
Free file upload services can be found at these sites:
http://www.rapidupload.com
http://storenow.net/
http://rapidshare.de
http://supashare.com
http://yourfilehost.com
http://briefcase.yahoo.com
http://geocities.yahoo.com
http://yousendit.com
Remember to copy any link before you leave their webpage.
Patrick
http://www.ravingnun.net/a
This will be only be up for 5 minutes. Reply when downloaded.
ravingnun,
Here's an example file with your data:
http://www.asdy88.dsl.pipe
Go to row 70 an press the button! Hopefully it does what you want. Let me know what you think.
Patrick
ravingnun,
In the first cell of the grid under the word 'Male' put this formula:
=SUMPRODUCT(($A$4:$AN$4=B$
Alter the range in the first cell before beginning the copying process to suit the range of data and then copy it down to the end of the list of activities and then copy/drag the whole block to the 'Female' column - that will give you the count of each activity for all males and females.
I think you will find it much easier to use than COUNTIF().
Patrick
William,
Here's an example file with your data:
http://www.asdy88.dsl.pipe
The Activity Already section needs to be in a location under which there is no data as the list is very long before it is simplified. So I have placed it besides the previous table. If you want it somewhere else you can always write a simple macro to copy the results to a different location.
Now the analysis of the Activity Already is actually impossible with the data as it is. It can of course be done manually but I guess that's not viable. You cannot use COUNTIF() or SUMPRODUCT() on it as the items you need to count are in strings in the original cells.
I think that if you want the Activities Already analysed in a macro then it merits another new question.
The code for the current question is:
==Code starts below this==
Sub activity_choice()
Dim rng1 As Range
Dim rng2 As Range
Application.ScreenUpdating
Set rng1 = Range([a17], [iv17].End(xlToLeft))
Set rng2 = Range([a71], [a65536].End(xlUp).Offset(
rng2.Clear
rng1.Copy
[a71].PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:=False, Transpose:=True
Set rng2 = Range([a71], [a65536].End(xlUp))
rng2.Sort Key1:=Range("A71"), Order1:=xlAscending, Header:=xlNo, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
For Each celle2 In rng2
If celle2 = celle2.Offset(-1, 0) Then
celle2.Offset(-1, 0).Clear
End If
Next celle2
rng2.Sort Key1:=Range("A71"), Order1:=xlAscending, Header:=xlNo, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
rng2.Font.Bold = True
Set rng2 = Range([a70], [a65536].End(xlUp).Offset(
rng2.Borders(xlDiagonalDow
rng2.Borders(xlDiagonalUp)
With rng2.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With rng2.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With rng2.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With rng2.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With rng2.Borders(xlInsideVerti
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With rng2.Borders(xlInsideHoriz
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
Set rng2 = Range([b71], [a65536].End(xlUp).Offset(
rng2.Select
Application.ScreenUpdating
[a71].Select
End Sub
Sub activities_already()
Dim rng1 As Range
Dim rng2 As Range
Dim celle As Range
Dim celle2 As Range
Dim x As Integer
Dim i As Integer
Dim str() As String
Application.ScreenUpdating
Set rng1 = Range([A8], [IV8].End(xlToLeft))
Set rng2 = Range([e71], [e65536].End(xlUp).Offset(
rng2.Clear
i = 0
For Each celle In rng1
str() = Split(celle, ", ")
For x = 0 To UBound(str)
Cells(x + 71 + i, 5) = str(x)
Next
i = i + UBound(str) + 1
Next celle
Set rng2 = Range([e71], [e65536].End(xlUp))
rng2.Sort Key1:=Range("E71"), Order1:=xlAscending, Header:=xlNo, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
For Each celle2 In rng2
If celle2 = celle2.Offset(-1, 0) Then
celle2.Offset(-1, 0).Clear
End If
Next celle2
Set rng2 = Range([e71], [e65536].End(xlUp))
rng2.Sort Key1:=Range("E71"), Order1:=xlAscending, Header:=xlNo, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
rng2.Font.Bold = True
Set rng2 = Range([e70], [e65536].End(xlUp).Offset(
rng2.Borders(xlDiagonalDow
rng2.Borders(xlDiagonalUp)
With rng2.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With rng2.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With rng2.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With rng2.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With rng2.Borders(xlInsideVerti
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With rng2.Borders(xlInsideHoriz
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
Application.ScreenUpdating
[e71].Select
End Sub
==Code ends above this==
Patrick
Business Accounts
Answer for Membership
by: FarajLYPosted on 2006-03-25 at 02:26:49ID: 16287706
try this
make select data & copy(Ctrl+c),go to your place
do right click and choose Paste specia , Transpose