Transpose and Repeat Question

anouhelp

New Member
Joined
Jan 19, 2023
Messages
2
Office Version
  1. 365
Platform
  1. Windows
Hi, I looked across the board and was unable to find a solution. I was wondering if there was a formula or code that I code to use to transpose and repeat data, just like below.

Thanks for you time and help!

CurrentWish
CustomerNameAddressEmailEmailEmailCustomerNameAddressEmail
1​
Jane
123​
1@32@33@3
1​
Jane
123​
1@3
2​
Jim
345​
1@42@44@4
1​
Jane
123​
2@3
3​
John
678​
1@52@55@5
1​
Jane
123​
3@3
2​
Jim
345​
1@4
2​
Jim
345​
2@4
2​
Jim
345​
4@4
3​
John
678​
1@5
3​
John
678​
2@5
3​
John
678​
5@5
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
Hi & welcome to MrExcel.
How about
Fluff.xlsm
ABCDEFGHIJK
1CustomerNameAddressEmailEmailEmailCustomerNameAddressEmail
21Jane1231@32@33@31Jane1231@3
32Jim3451@42@44@41Jane1232@3
43John6781@52@55@51Jane1233@3
52Jim3451@4
62Jim3452@4
72Jim3454@4
83John6781@5
93John6782@5
103John6785@5
11
Data
Cell Formulas
RangeFormula
H2:K10H2=HSTACK(TOCOL(IF(D2:F4="",x,A2:A4),2),TOCOL(IF(D2:F4="",x,B2:B4),2),TOCOL(IF(D2:F4="",x,C2:C4),2),TOCOL(D2:F4,1))
Dynamic array formulas.
 
Upvote 0
Hi & welcome to MrExcel.
How about
Fluff.xlsm
ABCDEFGHIJK
1CustomerNameAddressEmailEmailEmailCustomerNameAddressEmail
21Jane1231@32@33@31Jane1231@3
32Jim3451@42@44@41Jane1232@3
43John6781@52@55@51Jane1233@3
52Jim3451@4
62Jim3452@4
72Jim3454@4
83John6781@5
93John6782@5
103John6785@5
11
Data
Cell Formulas
RangeFormula
H2:K10H2=HSTACK(TOCOL(IF(D2:F4="",x,A2:A4),2),TOCOL(IF(D2:F4="",x,B2:B4),2),TOCOL(IF(D2:F4="",x,C2:C4),2),TOCOL(D2:F4,1))
Dynamic array formulas.

Fluff, thank you so much! That was exactly the solution I was looking for.

I hope I can be a contributor just like you!

Thanks again for your help!
 
Upvote 0
Here is an alternative solution using Power Query
Power Query:
let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    #"Unpivoted Other Columns" = Table.UnpivotOtherColumns(Source, {"Customer", "Name", "Address"}, "Attribute", "Value"),
    #"Removed Columns" = Table.RemoveColumns(#"Unpivoted Other Columns",{"Attribute"})
in
    #"Removed Columns"
 
Upvote 0
Glad to help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,215,110
Messages
6,123,149
Members
449,098
Latest member
Doanvanhieu

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