We’d like to remind Forumites to please avoid political debate on the Forum.

This is to keep it a safe and useful space for MoneySaving discussions. Threads that are – or become – political in nature may be removed in line with the Forum’s rules. Thank you for your understanding.

📨 Have you signed up to the Forum's new Email Digest yet? Get a selection of trending threads sent straight to your inbox daily, weekly or monthly!

Excel help

I have a data table in excel and need to manipulate how it is entered but not sure how to do it as it is beyond my Excel skills and I suspect it will require VBA.

To make the example easier I currently have a table about people's hobbies. In column A I have a unique number, in column B I have an ID number for the person, in column C I have their hobby and in column D I have their proficiency level

As a single person can have more than one hobby people are entered into the table N times.

What I want to do is create a new table where each persons ID number (ie column B) appears once and all their hobbies (from column C) appear in the following columns (1 per column).

So in the original table each person is in N rows where as in the new table there is 1 row per person but their hobbies fill N+1 columns

Any suggestions?

Comments

  • rmg1
    rmg1 Posts: 3,159 Forumite
    Part of the Furniture 1,000 Posts Name Dropper
    The fastest (and probably easiest) way to get what you want is to use a Pivot Table.
    You would have the person ID down the side, the hobby ID across the top, and the proficiency level in the middle/
    :wall: Flagellation, necrophilia and bestiality - Am I flogging a dead horse? :wall:

    Any posts are my opinion and only that. Please read at your own risk.
  • InsideInsurance
    InsideInsurance Posts: 22,460 Forumite
    10,000 Posts Combo Breaker
    Many thanks for the suggestion, the issue is that there are a couple of hundred different hobbies (and a few thousand people) and so a pivot table isnt going to work.

    Whilst the original data table has a proficiency level this can be ignored as I simply need a new table with 1 row per person an a horizontal list of their hobbies (irrespective of proficiency level) in the following columns.
  • m5rcc
    m5rcc Posts: 1,544 Forumite
    Part of the Furniture 1,000 Posts Combo Breaker
    You can do a Pivottable with 65,000 rows and 676 columns. It's built to handle large volumes of data
  • rmg1
    rmg1 Posts: 3,159 Forumite
    Part of the Furniture 1,000 Posts Name Dropper
    If that's all you need, you can also use formulae to do what you want but you'll need a helper column.

    I'll PM you a file over in a little while once I've worked out the intricacies.
    :wall: Flagellation, necrophilia and bestiality - Am I flogging a dead horse? :wall:

    Any posts are my opinion and only that. Please read at your own risk.
This discussion has been closed.
Meet your Ambassadors

🚀 Getting Started

Hi new member!

Our Getting Started Guide will help you get the most out of the Forum

Categories

  • All Categories
  • 351.7K Banking & Borrowing
  • 253.4K Reduce Debt & Boost Income
  • 454K Spending & Discounts
  • 244.7K Work, Benefits & Business
  • 600.1K Mortgages, Homes & Bills
  • 177.3K Life & Family
  • 258.4K Travel & Transport
  • 1.5M Hobbies & Leisure
  • 16.2K Discuss & Feedback
  • 37.6K Read-Only Boards

Is this how you want to be seen?

We see you are using a default avatar. It takes only a few seconds to pick a picture.