Question

Relisting Out Data

Asked by: RavingNun

I 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|Cars|AirPlanes|

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.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2006-03-24 at 20:03:54ID21788328
Tags

data

,

countif

,

i

Topic

Microsoft Excel Spreadsheet Software

Participating Experts
3
Points
500
Comments
26

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

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.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

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.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

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.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. Sports Simulation
    I am creating a sports textual/statistical simulation. I would like to make the program output its text to a windown instead of a dos prompt. I am very new at windows programming and know little about creating win apps. All I would need is a window that has a text box in t...
  2. UK CAR INDUSTRIES
    I have been looking for the statistic about the UK car industries for one whole day and i didn't find what I wanted. Therefore I want to ask you if you have or know the statistic that I wanted. The statistics I need are:- 1.) The percentage of UK exporting cars to the USA. ...
  3. Countif with "OR"
    Hi All, I have 3 columns, each column can either contain a date, Yes, No, N/A or Null. I need to create a table that counts: - The number of records that have a date in any of the 3 columns within the past year (A) - The number of records with a yes in any of the 3...
  4. Countif in a subtotal
    Hi experts Is this possible? I have a simple subtotal column and I need a countif formula to count the number of x, y, s etc.. Thanks
  5. SQL Server: Gender column
    I am writing web application using Visual Studio 2005 and SQL Server 2005. What do you think should be data type for Gender column nchar(1) or bit, storing 'M' & 'F' or '1' & '0'. Just wondering what is better choice and why? Thanks.

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

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.

Join the Community

Answers

 

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

 

by: RavingNunPosted on 2006-03-25 at 02:30:18ID: 16287733

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

 

by: matthewspatrickPosted on 2006-03-25 at 04:38:12ID: 16288232

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

 

by: patrickabPosted on 2006-03-25 at 04:48:13ID: 16288247

RavingNun,

Here's an example file:

http://www.asdy88.dsl.pipex.com/Experts%20Exchange/transpose_etc.xls

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

 

by: RavingNunPosted on 2006-03-25 at 04:57:21ID: 16288269

Yes thats what I want it to do. I toke a look at the macro. Do you want me to use that or is that just to make sure that you got the right thing?

 

by: patrickabPosted on 2006-03-25 at 04:58:38ID: 16288275

RavingNun,

Here's a corrected example file:

http://www.asdy88.dsl.pipex.com/Experts%20Exchange/transpose_etc02.xls

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, DataOption1:=xlSortNormal
   
    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, DataOption1:=xlSortNormal
    [a3].Select

End Sub

==code ends above this==

Hope that deletes all the dupes.

Patrick

 

by: patrickabPosted on 2006-03-25 at 05:01:20ID: 16288281

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

 

by: patrickabPosted on 2006-03-25 at 05:03:49ID: 16288287

p.s. I have never managed to get any of the Yahoo sites to work for me - it's probably me!

 

by: RavingNunPosted on 2006-03-25 at 05:04:08ID: 16288289

http://www.ravingnun.net/analysis.xls

This will be only be up for 5 minutes. Reply when downloaded.

 

by: RavingNunPosted on 2006-03-25 at 05:07:30ID: 16288304

It is for me ActivityChoice:
This file I gave you are just some of the many results, so this really needs to be computer-based.

 

by: patrickabPosted on 2006-03-25 at 05:21:39ID: 16288338

RavingNun - I've got a copy, thanks. Will comment in a moment. - Patrick

 

by: patrickabPosted on 2006-03-25 at 05:26:37ID: 16288351

RavingNun,

Now that I have some example data could you (I know it's tedious) re-describe how you want the data dealt with. I've had a look at the Full Analysis sheet and see what's been done there but I'm now not clear what more needs to be done.

Patrick

 

by: RavingNunPosted on 2006-03-25 at 05:28:27ID: 16288358

I have several results under ActivityChoice:
I just want them to list out under the ActivityChoice: in bold below and then use the countif function.

 

by: patrickabPosted on 2006-03-25 at 05:54:31ID: 16288416

OK understood re: the ActivityChoice. But I'm not sure what you want with the COUNTIF() function. If you mean that you don't want duplicate activities then I understand. Please re-confirm this last bit.

 

by: patrickabPosted on 2006-03-25 at 05:58:35ID: 16288424

I'm afraid I'm going out for the next 6 hours. Perhaps someone else will pick this up in the meantime. If they do, then just go with it please as I fully understand that you can't wait just for me!

 

by: RavingNunPosted on 2006-03-25 at 06:36:54ID: 16288722

The countif doesnt matter. I got that covered. Just need them relisted.

 

by: patrickabPosted on 2006-03-25 at 13:13:09ID: 16290610

OK, I'm back after 7hrs! I'll start again now.

 

by: patrickabPosted on 2006-03-25 at 15:24:54ID: 16291168

ravingnun,

Here's an example file with your data:

http://www.asdy88.dsl.pipex.com/Experts%20Exchange/analysis_ravingnuns02.xls

Go to row 70 an press the button! Hopefully it does what you want. Let me know what you think.

Patrick

 

by: patrickabPosted on 2006-03-25 at 15:35:27ID: 16291200

ravingnun,

In the first cell of the grid under the word 'Male' put this formula:

=SUMPRODUCT(($A$4:$AN$4=B$70)*($A$17:$AN$17=$A71))

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

 

by: RavingNunPosted on 2006-03-25 at 16:53:39ID: 16291464

Ahh its for ActivityChoice not for Activity Already. Although both would be good.

 

by: RavingNunPosted on 2006-03-25 at 16:59:48ID: 16291483

Oh sorry, you did do activity choice. but its supposed to go under C52

 

by: RavingNunPosted on 2006-03-26 at 00:21:31ID: 16292566

No button just the macro would be good.

Thanks

 

by: patrickabPosted on 2006-03-26 at 02:44:35ID: 16293129

William,

Well, I actually did Activity Choice first. I have also done Activity Already, which is a totally different problem as it has strings in each cell which need to be split, listed, sorted, duplicates eliminated and re-sorted.

I'll let you see it soon!

Patrick

 

by: patrickabPosted on 2006-03-26 at 04:02:13ID: 16293272

William,

Here's an example file with your data:

http://www.asdy88.dsl.pipex.com/Experts%20Exchange/analysis_ravingnuns03.xls

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 = False
   
    Set rng1 = Range([a17], [iv17].End(xlToLeft))
    Set rng2 = Range([a71], [a65536].End(xlUp).Offset(0, 2))
    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, DataOption1:=xlSortNormal
       
    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, DataOption1:=xlSortNormal
    rng2.Font.Bold = True
    Set rng2 = Range([a70], [a65536].End(xlUp).Offset(0, 2))

    rng2.Borders(xlDiagonalDown).LineStyle = xlNone
    rng2.Borders(xlDiagonalUp).LineStyle = xlNone
    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(xlInsideVertical)
        .LineStyle = xlContinuous
        .Weight = xlThin
        .ColorIndex = xlAutomatic
    End With
    With rng2.Borders(xlInsideHorizontal)
        .LineStyle = xlContinuous
        .Weight = xlThin
        .ColorIndex = xlAutomatic
    End With
    Set rng2 = Range([b71], [a65536].End(xlUp).Offset(0, 1))
    rng2.Select
   
    Application.ScreenUpdating = True
       
    [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 = False
   
    Set rng1 = Range([A8], [IV8].End(xlToLeft))
    Set rng2 = Range([e71], [e65536].End(xlUp).Offset(0, 2))
    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, DataOption1:=xlSortNormal
   
    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, DataOption1:=xlSortNormal
    rng2.Font.Bold = True
   
    Set rng2 = Range([e70], [e65536].End(xlUp).Offset(0, 2))
   
    rng2.Borders(xlDiagonalDown).LineStyle = xlNone
    rng2.Borders(xlDiagonalUp).LineStyle = xlNone
    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(xlInsideVertical)
        .LineStyle = xlContinuous
        .Weight = xlThin
        .ColorIndex = xlAutomatic
    End With
    With rng2.Borders(xlInsideHorizontal)
        .LineStyle = xlContinuous
        .Weight = xlThin
        .ColorIndex = xlAutomatic
    End With
   
    Application.ScreenUpdating = True
   
    [e71].Select
   
End Sub

==Code ends above this==


Patrick

 

by: RavingNunPosted on 2006-03-26 at 04:05:36ID: 16293276

Thats not really what Iam looking for. But I think I can mod that.
Thanks again, Patrick.
Points awarded. :)

 

by: patrickabPosted on 2006-03-26 at 04:12:09ID: 16293292

RavingNun - Thanks for the grade. If you want it modifying because it doesn't meet the original requirements of the question, do please let me know. - Patrick

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...