Splitting Row into multiple rows but keeping the identifier

robk123

New Member
Joined
Dec 3, 2022
Messages
1
Office Version
  1. 365
Platform
  1. Windows
  2. MacOS
Hello,
I have tried searching but I'm unable to find a solution to this. Hoping to get help on this.

I have a set of data in one row and I would like to split the row into multiple rows but keep the identifier (First Name, Last Name, and Date).

Ultimately, I would like to put this data in a format that I can do pivot table to look at the Name, ET, and Amount

First NameLast NameDateET1AmountReceiptET2AmountReceiptET3AmountReceipt
JohnDoe12/1/2022Airfare$100Test.txtHotel$200Test2.txtMeals$300Test3.txt
TonySmith12/2/2022Meals$50Test4.txt
EricXXX11/30/2022Supplies$20Test5.txtMisc$50Test6.txt
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
Hi & welcome to MrExcel.
How about
Fluff.xlsm
ABCDEFGHIJKL
1First NameLast NameDateET1AmountReceiptET2AmountReceiptET3AmountReceipt
2JohnDoe01/12/2022Airfare$100Test.txtHotel$200Test2.txtMeals$300Test3.txt
3TonySmith02/12/2022Meals$50Test4.txt
4EricXXX30/11/2022Supplies$20Test5.txtMisc$50Test6.txt
5
6JohnDoe01/12/2022Airfare$100Test.txt
7JohnDoe01/12/2022Hotel$200Test2.txt
8JohnDoe01/12/2022Meals$300Test3.txt
9TonySmith02/12/2022Meals$50Test4.txt
10EricXXX30/11/2022Supplies$20Test5.txt
11EricXXX30/11/2022Misc$50Test6.txt
12
Main
Cell Formulas
RangeFormula
A6:F11A6=LET(a,CHOOSECOLS(D2:J4,1,4,7),HSTACK(TOCOL(IF(a="",x,A2:A4),2),TOCOL(IF(a="",x,B2:B4),2),TOCOL(IF(a="",x,C2:C4),2),WRAPROWS(TOCOL(D2:L4,1),3)))
Dynamic array formulas.
 
Upvote 0
Power Query solution: Choose all columns except First Name, Last Name and Date, and choose the "unPivot Columns" action.

Book1
ABCDEFGHIJKL
1First NameLast NameDateET1AmountReceiptET2Amount2Receipt3ET3Amount4Receipt5
2JohnDoe01/12/2022Airfare$100Test.txtHotel$200Test2.txtMeals$300Test3.txt
3TonySmith02/12/2022Meals$50Test4.txt
4EricXXX30/11/2022Supplies$20Test5.txtMisc$50Test6.txt
5
6First NameLast NameDateAttributeValue
7JohnDoe01/12/2022ET1Airfare
8JohnDoe01/12/2022Amount$100
9JohnDoe01/12/2022ReceiptTest.txt
10JohnDoe01/12/2022ET2Hotel
11JohnDoe01/12/2022Amount2$200
12JohnDoe01/12/2022Receipt3Test2.txt
13JohnDoe01/12/2022ET3Meals
14JohnDoe01/12/2022Amount4$300
15JohnDoe01/12/2022Receipt5Test3.txt
16TonySmith02/12/2022ET1Meals
17TonySmith02/12/2022Amount$50
18TonySmith02/12/2022ReceiptTest4.txt
19EricXXX30/11/2022ET1Supplies
20EricXXX30/11/2022Amount$20
21EricXXX30/11/2022ReceiptTest5.txt
22EricXXX30/11/2022ET2Misc
23EricXXX30/11/2022Amount2$50
24EricXXX30/11/2022Receipt3Test6.txt
Sheet1
 
Upvote 0

Forum statistics

Threads
1,223,264
Messages
6,171,081
Members
452,377
Latest member
bradfordsam

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