Help to Transpose Data from rows to Column based on the same Value

gargilang

New Member
Joined
Jun 17, 2022
Messages
19
Office Version
  1. 365
Platform
  1. Windows
Hello, I have some data here that I would like to transpose based on the same value in between underscore of column D:
Book2
ACD
1NumberOrder Number@Photo
2111111_1111_xxx.jpg
31234522_12345_xxx.jpg
41234533_12345_yyy.jpg
5222244_2222_xxx.jpg
6222255_2222_yyy.jpg
7222266_2222_zzz.jpg
8333333030_33333_xxx.jpg
9333333131_33333_yyy.jpg
104321Pkg1Pkg1_4321_xxx.jpg
114321Pkg2Pkg2_4321_yyy.jpg
124321Pkg3Pkg3_4321_zzz.jpg
134321Pkg4Pkg4_4321_aaa.jpg
Sheet1
Cell Formulas
RangeFormula
A2:A13A2=SUBSTITUTE(MID(D2,FIND("_",D2,1)+1,5),"_","")
C2:C13C2=LEFT(D2,FIND("_",D2)-1)


Based on the data above, this is how I would like the transpose. It start from column F to O in which I will need this region converted to CSV for DataMerging in InDD:
Book2
ACDEFGHIJKLMNO
1NumberOrder Number@PhotoItemOrder1Order2Order3Image1Image2Image3@Photo1@Photo2@Photo3
2111111_1111_xxx.jpg111111_1111_xxx.jpg
31234522_12345_xxx.jpg12345232_12345_xxx.jpg3_12345_yyy.jpg2_12345_xxx.jpg3_12345_yyy.jpg
41234533_12345_yyy.jpg22224564_2222_xxx.jpg5_2222_yyy.jpg6_2222_zzz.jpg4_2222_xxx.jpg5_2222_yyy.jpg6_2222_zzz.jpg
5222244_2222_xxx.jpg33333303130_33333_xxx.jpg31_33333_yyy.jpg30_33333_xxx.jpg31_33333_yyy.jpg
6222255_2222_yyy.jpg4321Pkg1Pkg2Pkg3Pkg1_4321_xxx.jpgPkg2_4321_yyy.jpgPkg3_4321_zzz.jpgPkg1_4321_xxx.jpgPkg2_4321_yyy.jpgPkg3_4321_zzz.jpg
7222266_2222_zzz.jpg4321Pkg4Pkg4_4321_aaa.jpgPkg4_4321_aaa.jpg
8333333030_33333_xxx.jpg
9333333131_33333_yyy.jpg
104321Pkg1Pkg1_4321_xxx.jpg
114321Pkg2Pkg2_4321_yyy.jpg
124321Pkg3Pkg3_4321_zzz.jpg
134321Pkg4Pkg4_4321_aaa.jpg
Sheet1
Cell Formulas
RangeFormula
A2:A13A2=SUBSTITUTE(MID(D2,FIND("_",D2,1)+1,5),"_","")
C2:C13C2=LEFT(D2,FIND("_",D2)-1)


I want to mention that number of rows from the first data (Column A-D) is always changed. And I am planning to build this into VBA for frequent use. Hopefully someone can help with formula or VBA or any other excel features has to offer. Also I would like to mention that I am using Microsoft Excel:
Version 1908 (Build 11929.20648)
Office 365 MSO (16.0.11929.20436)
Semi-annual Channel.

I hope it makes sense. Thank you very much in advance for all your help and attention in advance.
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.

Forum statistics

Threads
1,223,230
Messages
6,170,883
Members
452,364
Latest member
springate

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