VBA script to Copy Data from a Vertical Format to a sorted Horizontal format.

ronaldj31

New Member
Joined
Apr 27, 2021
Messages
1
Office Version
  1. 365
Platform
  1. Windows
Hi Everyone,
New member here, thanks for letting me join, lots of great into although I cant seem to find what I'm looking for. Please go a little easy as I'm fairly new to VBA. I have what I believe is a 'not' so easy transpose of data from a Vertical format to a "sorted" Horizontal format that is dependent on the number of elements present in the raw data file.

The data I have attached is from an instrument that does not allow data to be exported in a horizontal format. It is a small example of what can be a larger export file with more line items, i.e. the number of rows can change from export to export. The raw data as it is exported from the instrument is shown in Columns A to D. The required output is shown in columns P to S (although it does not need to be specifically there, with the ultimate aim to create a new workbook with the transposed/sorted data). I hope this makes some sense. Thank you for any help you may be able to offer.
 

Attachments

  • Test_1.PNG
    Test_1.PNG
    34.9 KB · Views: 11

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
Hi & welcome to MrExcel.
will each label always have the some number of elements & will they alwasy be listed in the same order?
 
Upvote 0

Forum statistics

Threads
1,215,059
Messages
6,122,918
Members
449,093
Latest member
dbomb1414

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