Combine Several Rows into one row given the data in the first column

adecredico

New Member
Joined
Apr 23, 2019
Messages
2
Hi all,

I've been working on trying to set up a spreadsheet that others will be able to easily use. I've created a spreadsheet that automatically pulls the data from another worksheet but I can't figure out how to have the different column rows to combine.

Name
Segment Code
Date
Start Time
End Time
Duration
Memo
Carrie
Code: AUU: Unapproved Absence Unpaid
4/22/2019
6:00:00 AM
9:00:00 AM
0.03:00:00
4/22/2019
10:00:00 AM
12:00:00 PM
0.02:00:00
Patty
Code: APU: Time Off Unpaid
4/24/2019
Planned time off, advance approval by
4/25/2019
Planned time off, advance approval
4/26/2019
Planned time off, advance approval

<tbody>
</tbody>

This is what I would like for the final outcome:

Name
Segment Code
Date
Start Time
End Time
Duration
Memo
Carrie
Code: AUU: Unapproved Absence Unpaid
4/22/2019
6:00:00 AM
9:00:00 AM
0.03:00:00
4/22/2019
10:00:00 AM
12:00:00 PM
0.02:00:00
Patty
Code: APU: Time Off Unpaid
4/24/2019
Planned time off, advance approval by
4/25/2019
Planned time off, advance approval
4/26/2019
Planned time off, advance approval

<tbody>
</tbody>

Any help is much appreciated! Anne
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
Here is a Power Query Solution. The following is the Mcode developed using the UI. Power Query is available in all versions of Excel from 2010 forward. This is a couple of steps and is easy to learn. If you want more information, the book, M is for (Data) Monkey is a great resource for learning how to manipulate data quickly and easily.

Code:
let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Name", type text}, {"Segment Code", type text}, {"Date", type datetime}, {"Start Time", type number}, {"End Time", type number}, {"Duration", type duration}, {"Memo", type text}}),
    #"Filled Down" = Table.FillDown(#"Changed Type",{"Name", "Segment Code"}),
    #"Filtered Rows" = Table.SelectRows(#"Filled Down", each ([Date] <> null)),
    #"Changed Type1" = Table.TransformColumnTypes(#"Filtered Rows",{{"Start Time", type time}, {"End Time", type time}})
in
    #"Changed Type1"

vABCDEFG
1NameSegment CodeDateStart TimeEnd TimeDurationMemo
2CarrieCode: AUU: Unapproved Absence Unpaid4/22/2019 0:006:00:00 AM9:00:00 AM0.03:00:00
3CarrieCode: AUU: Unapproved Absence Unpaid4/22/2019 0:0010:00:00 AM12:00:00 PM0.02:00:00
4PattyCode: APU: Time Off Unpaid4/24/2019 0:00Planned time off, advance approval by
5PattyCode: APU: Time Off Unpaid4/25/2019 0:00Planned time off, advance approval
6PattyCode: APU: Time Off Unpaid4/26/2019 0:00Planned time off, advance approval
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,540
Messages
6,120,107
Members
448,945
Latest member
Vmanchoppy

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