• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

How to extract text list from data table

DAFTCHILD

New Member
Hi


I apologise in advance if this question has been answered elsewhere. I have been searching the site for 3 hours and attempting some of the options I have come across, but I cant quite get it to do what I want.


I have a table of MI that I will need to update monthly to tell me if I have enough resource for specific areas. The MI contains mountains of information, but essentially there are 2 columns of information I need. I have 1 column which contains the names of people, and the second column contains processes they are trained in. Here is an example (Sorry if the layout doesnt come across right)

[pre]
Code:
Name                    Task
John Smith              Task 1
John Smith              Task 2
John Smith              Task 3
Jane Smith              Task 2
Jane Smith              Task 4
Joe Bloggs              Task 1
Joe Bloggs              Task 3
Joe Bloggs              Task 4
[/pre]
My data will contain 100 consultants who could potentially be trained in up to 135 tasks, so the actual data table is huge.


I need to be able to extract the information into 2 lists. One which will have a column titled by the task name, and then list all the consultants who are trained in it underneath, the other needs to have the consultant name as the title, and then all the tasks they are trained in underneath.


Ive tried filtering, VLOOKUP and matching etc but I cant seem to work it out.


If anyone could help me out at all or point me in the direction of a previous post I would owe you many cups of tea!
 
If im following you correctly... a pivot table (perhaps 2) should do this fairly easily.


highlight the 2 columns you mention and create a pivot table. You can play around with different layouts but i think you'd want both fields in your Columns box. You may (probably) need to do one Pivot sorting the data by their names and another one sorting the data by task.
 
Hi


Thanks for replying. Ill play about with the Pivot function again. It does get me a version of what I wanted, I think I may then need to do some work on removing the blank columns where a particular person isnt trained in a task for example.


Thanks again for your quick reply
 
Hi, DAFTCHILD!


First of all welcome to Chandoo's website Excel forums. Thank you for your joining us and glad to have you here.


As a starting point I'd recommend you to read the green sticky topics at this forums main page. There you'll find general guidelines about how this site and community operates (introducing yourself, posting files, netiquette rules, and so on).


Among them you're prompted to perform searches within this site before posting, because maybe your question had been answered yet.


Feel free to play with different keywords so as to be led thru a wide variety of articles and posts, and if you don't find anything that solves your problem or guides you towards a solution, you'll always be welcome back here. Tell us what you've done, consider uploading a sample file as recommended, and somebody surely will read your post and help you.


And about questions in general...


If you haven't performed yet the search herein, try going to the topmost right zone of this page (Custom Search), type the keywords used in Tags field when creating the topic or other proper words and press Search button. You'd retrieve many links from this website, like the following one(s) -if any posted below-, maybe you find useful information and even the solution. If not please advise so as people who read it could get back to you as soon as possible.


And about this question in particular...


Give a look at this file:

https://dl.dropboxusercontent.com/u/60558749/How%20to%20extract%20text%20list%20from%20data%20table%20%28for%20DAFTCHILD%20at%20chandoo.org%29.xlsx


Assuming your data is in columns A:B, try this:


D2: =SI.ERROR(INDICE(DataNameList;COINCIDIR(0;INDICE(CONTAR.SI(D$1:D1;DataNameList);0;0);0));"") -----> in english: =IFERROR(INDEX(DataNameList,MATCH(0,INDEX(COUNTIF(D$1:D1,DataNameList),0,0),0)),"")

and copy down as required


E1: =TRANSPONER(SI.ERROR(INDICE(DataTaskList;COINCIDIR(0;INDICE(CONTAR.SI($D1:D1;DataTaskList);0;0);0));"")) -----> in english: =TRANSPOSE(IFERROR(INDEX(DataTaskList,MATCH(0,INDEX(COUNTIF($D1:D1,DataTaskList),0,0),0)),""))

and copy across


E2: =SI.ERROR(SI(COINCIDIR($D2&E$1;DataNameList&DataTaskList;0)=0;"";"X");"") -----> in english: =IFERROR(IF(MATCH($D2&E$1,DataNameList&DataTaskList,0)=0,"","X"),"")

and copy down and across to fill the above ranges.

It's an array formula, so remember that array formulas should be entered with Ctrl-Shift-Enter instead of just Enter.


Just advise if any issue.


Regards!
 
hmmm...i'm not sure how the blank cells are 'interfiering' with your desired results as the Pivot shouldnt show/include them.(care to elaborate?)


i changed my mind... i would put your Task field and Name field in the ROW labels box. with Task field first and then name underneath, it should list Task 1 and everyone who is indicated as being trained in Task 1 under it... then Task 2, and 3 and 4.


you could simply switch the order, have Name first and then Task, to see a list sorted by each name (BOB) and then each of the tasks Bob is trained on.
 
Hi SirJB7, thanks for your post. I did spend a good few hours searching words that I thought might be relevant, but I am not entirely skilled in the exact phrases that come with Excel. I certainly would never have come up with formulas like that! I havent heard of an array formula so I will do some reading and give them a try tomorrow.


Jason - I think the gaps were more to do with how I was selecting the information to be laid out. Ill try your suggestion tomorrow, thanks for coming back to me
 
Back
Top