Sorting/grouping when there are multiple values in one cell

3

1

I have an Excel 2007 spreadsheet, where each row of the dataset describes a feature of a piece of software.

One of the columns in the spreadsheet is Relevant Users, which describes which users of the software the feature is of interest to. There may be a couple of different users interested in a feature, in which case I've been filling in the cell with the two user types separated by a colon, e.g. 'Usertype A; Usertype D'.

Occassionally, I'd like to sort my data by the Relevant Users column. However, the way I'm populating the column means the sorting isn't very smart. If I have a feature where 'Relevant Users' is 'Usertype A; Usertype D', and then I sort by Relevant Users, that feature will be grouped at the end of all the other features of relevant to Usertype A, as it's just sorting alphabetically. But I want it to be listed in the two separate groups of Usertype A and Usertype D.

Or, if I have a pivot table that groups the features together under the heading of Relevant User, I'll get all the features for 'Usertype A', then 'Usertype B', then 'Usertype C', then 'Usertype D', then 'Usertype A; Usertype D', etc. Whereas I really want a feature with Relevant Users as 'Usertype A; Usertype D' to show up in both the Usertype A group and the Usertype D group.

I guess if this information was in a database I might have a many-to-many table linking Relevant Users to features. But is there a way to go about having this kind of many-to-many relationship in Excel?

ngm

Posted 2010-04-15T15:02:01.947

Reputation: 1 593

How many different usertypes are there? – Sux2Lose – 2010-04-15T16:36:00.150

There's 10 so far, and it could increase -- I guess 'role' would be a better word to use than 'usertype'. – ngm – 2010-04-16T08:18:49.430

Answers

2

The easiest way would probably be to put all the values in separate columns, e.g. make a column for each usertype, put like a "yes" in valid columns, and sort them individually. It's maybe less elegant that what you're looking for, but it's simple.

50an6xy06r6n

Posted 2010-04-15T15:02:01.947

Reputation: 46

Thanks, I'll give that a go, but with 10 or more usertypes, as you say it probably won't be elegant, so I may look for another solution. And I'm not sure how it would work with pivot tables. – ngm – 2010-04-16T08:22:37.613

0

I think the most scalable method is to use a different row for each feature-role combination. It's also ideal for pivoting.

Sux2Lose

Posted 2010-04-15T15:02:01.947

Reputation: 2 962