How to combine data of the same person into 1 cell

Status
Not open for further replies.

chornat

New Member
Joined
Mar 16, 2021
Messages
8
Office Version
  1. 2010
Platform
  1. Windows
Hi

I have a very badly design report where there's a lot of duplicate data in many rows. (sadly, the IT has not consult me before they launch the system) T-T

Basically, I'm working on employee's development plan where one person has more than one row of action plan. I need to combine the data that one person has only one row of information

Here is the simplified version of the report.

IDNameDevelopment GoalDetailsCompetencyMethod
11023545MollyEnglish language skillsIncrease knowledge of English language skills in listening, reading and comprehension to apply for work. (by SEP., 2021.)Study
11023545MollyEnglish language skillsIncrease knowledge of English language skills in listening, reading and comprehension to apply for work. (by SEP., 2021.)Practice
11023545MollyEnglish language skillsIncrease knowledge of English language skills in listening, reading and comprehension to apply for work. (by SEP., 2021.)Coaching
11033851AmyEnglish skillfor presentationLC1.1Study
11034213AmyStrategic thinkingAnalyst data to use in daily workLC1.1Study
11034213AmyStrategic thinkingAnalyst data to use in daily workLC3.2Study
41000003SallyStrategic thinkingDevelop own thinking systemLC1.3Study
41000003SallyStrategic thinkingDevelop own thinking systemLC3.2Study
41000003SallyStrategic thinkingDevelop own thinking systemLC4.1Study
41000003SallyStrategic thinkingDevelop own thinking systemLC3.3Study

and I need to make a report for my boss to look like this.
- combine column "development goal" : "details"
- without any duplication data

IDNameDevelopment Goal
11023545MollyEnglish language skills: Increase knowledge of English language skills in listening, reading and comprehension to apply for work. (by SEP., 2021.)
11033851AmyEnglish skill: for presentation

Strategic thinking:Analyst data to use in daily work
41000003SallyStrategic thinking: Develop own thinking system


I know that it must be complicated. if not the whole thing, only some steps that ease the pain, would be appreciated.
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
Here is a Power Query Solution.

Power Query:
let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"ID", Int64.Type}, {"Name", type text}, {"Development Goal", type text}, {"Details", type text}, {"Competency", type text}, {"Method", type text}}),
    #"Removed Duplicates" = Table.Distinct(#"Changed Type", {"ID"}),
    #"Merged Columns" = Table.CombineColumns(#"Removed Duplicates",{"Development Goal", "Details"},Combiner.CombineTextByDelimiter(":", QuoteStyle.None),"Merged"),
    #"Removed Columns" = Table.RemoveColumns(#"Merged Columns",{"Competency", "Method"})
in
    #"Removed Columns"

Book3
ABC
1IDNameMerged
211023545MollyEnglish language skills:Increase knowledge of English language skills in listening, reading and comprehension to apply for work. (by SEP., 2021.)
311033851AmyEnglish skill:for presentation
411034213AmyStrategic thinking:Analyst data to use in daily work
541000003SallyStrategic thinking:Develop own thinking system
Table1
 
Upvote 0
Here is a Power Query Solution.

Power Query:
let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"ID", Int64.Type}, {"Name", type text}, {"Development Goal", type text}, {"Details", type text}, {"Competency", type text}, {"Method", type text}}),
    #"Removed Duplicates" = Table.Distinct(#"Changed Type", {"ID"}),
    #"Merged Columns" = Table.CombineColumns(#"Removed Duplicates",{"Development Goal", "Details"},Combiner.CombineTextByDelimiter(":", QuoteStyle.None),"Merged"),
    #"Removed Columns" = Table.RemoveColumns(#"Merged Columns",{"Competency", "Method"})
in
    #"Removed Columns"

Book3
ABC
1IDNameMerged
211023545MollyEnglish language skills:Increase knowledge of English language skills in listening, reading and comprehension to apply for work. (by SEP., 2021.)
311033851AmyEnglish skill:for presentation
411034213AmyStrategic thinking:Analyst data to use in daily work
541000003SallyStrategic thinking:Develop own thinking system
Table1

Thank you! at least it solved half of the process! ^-^
 
Upvote 0
Update:

I am very new to Power Query. Frankly, I don't know where to put the code. hahaha. But thanks to @alansidman, I read his code and did it manually as follow,

1. concatenate "ID", "Name", "Development Goal", "Details"
2. remove duplicate in above column
3. in different column, ="Development Goal"& " : "&"Details"

So, this is like very brutal way of surviving excel 555

Next, How to combine 2 row that got the same name?

This is what I want at the end


Name
Development Goal
11023545MollyEnglish language skills: Increase knowledge of English language skills in listening, reading and comprehension to apply for work. (by SEP., 2021.)
11033851AmyEnglish skill: for presentation

Strategic thinking:Analyst data to use in daily work
41000003SallyStrategic thinking: Develop own thinking system
 
Upvote 0
Power Query is a free AddIn for Excel 2010 and 2013, and is built-in functionality from Excel 2016 onwards (where it is referred to as "Get & Transform Data").

It is a powerful yet simple way of getting, changing and using data from a broad variety of sources, creating steps which may be easily repeated and refreshed. I strongly recommend learning how to use Power Query - it's among the most powerful functionalities of Excel.

- Follow this link to learn how to install Power Query in Excel 2010 / 2013.

- Follow this link for an introduction to Power Query functionality.

- Follow this link for a video which demonstrates how to use Power Query code provided.
 
Upvote 0
Power Query is a free AddIn for Excel 2010 and 2013, and is built-in functionality from Excel 2016 onwards (where it is referred to as "Get & Transform Data").

It is a powerful yet simple way of getting, changing and using data from a broad variety of sources, creating steps which may be easily repeated and refreshed. I strongly recommend learning how to use Power Query - it's among the most powerful functionalities of Excel.

- Follow this link to learn how to install Power Query in Excel 2010 / 2013.

- Follow this link for an introduction to Power Query functionality.

- Follow this link for a video which demonstrates how to use Power Query code provided.

I definitely will do! (and after learning that my office's ms office is 2016, that is!)
 
Upvote 0
Status
Not open for further replies.

Forum statistics

Threads
1,223,887
Messages
6,175,199
Members
452,617
Latest member
Narendra Babu D

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top