Adriaan_VBA
New Member
- Joined
- Dec 23, 2013
- Messages
- 1
I need to convert a data matrix in Excel to a csv-file and would like to use a VBA for it, as i need to multiple large sheets. I have searched the web but can't find solutions for it. Who can help me out here?
example data matrix i have:
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]Product 1[/TD]
[TD]Product 2[/TD]
[TD]Product 2[/TD]
[TD]Product 2[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]volume[/TD]
[TD]price[/TD]
[TD]volume[/TD]
[TD]price[/TD]
[/TR]
[TR]
[TD]Company A[/TD]
[TD]1000[/TD]
[TD]2[/TD]
[TD]3000[/TD]
[TD]4[/TD]
[/TR]
[TR]
[TD]Company B[/TD]
[TD]5000[/TD]
[TD]6[/TD]
[TD]7000[/TD]
[TD]8[/TD]
[/TR]
</tbody>[/TABLE]
it needs to look like, so I can convert it to a CSV file for uploading it to Salesforce:
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]Product[/TD]
[TD]Metric[/TD]
[TD]Value[/TD]
[/TR]
[TR]
[TD]Company A[/TD]
[TD]1[/TD]
[TD]volume[/TD]
[TD]1000[/TD]
[/TR]
[TR]
[TD]Company A[/TD]
[TD]1[/TD]
[TD]price[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]Company A[/TD]
[TD]2[/TD]
[TD]volume[/TD]
[TD]3000[/TD]
[/TR]
[TR]
[TD]Company A[/TD]
[TD]2[/TD]
[TD]price[/TD]
[TD]4[/TD]
[/TR]
[TR]
[TD]Company B[/TD]
[TD]1[/TD]
[TD]volume[/TD]
[TD]5000[/TD]
[/TR]
[TR]
[TD]Company B[/TD]
[TD]1[/TD]
[TD]price[/TD]
[TD]6[/TD]
[/TR]
[TR]
[TD]Company B[/TD]
[TD]2[/TD]
[TD]volume[/TD]
[TD]7[/TD]
[/TR]
[TR]
[TD]Company B[/TD]
[TD]2[/TD]
[TD]price[/TD]
[TD]8000[/TD]
[/TR]
</tbody>[/TABLE]
Any tips and tricks are helpful
Thanks,
Adriaan
example data matrix i have:
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]Product 1[/TD]
[TD]Product 2[/TD]
[TD]Product 2[/TD]
[TD]Product 2[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]volume[/TD]
[TD]price[/TD]
[TD]volume[/TD]
[TD]price[/TD]
[/TR]
[TR]
[TD]Company A[/TD]
[TD]1000[/TD]
[TD]2[/TD]
[TD]3000[/TD]
[TD]4[/TD]
[/TR]
[TR]
[TD]Company B[/TD]
[TD]5000[/TD]
[TD]6[/TD]
[TD]7000[/TD]
[TD]8[/TD]
[/TR]
</tbody>[/TABLE]
it needs to look like, so I can convert it to a CSV file for uploading it to Salesforce:
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]Product[/TD]
[TD]Metric[/TD]
[TD]Value[/TD]
[/TR]
[TR]
[TD]Company A[/TD]
[TD]1[/TD]
[TD]volume[/TD]
[TD]1000[/TD]
[/TR]
[TR]
[TD]Company A[/TD]
[TD]1[/TD]
[TD]price[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]Company A[/TD]
[TD]2[/TD]
[TD]volume[/TD]
[TD]3000[/TD]
[/TR]
[TR]
[TD]Company A[/TD]
[TD]2[/TD]
[TD]price[/TD]
[TD]4[/TD]
[/TR]
[TR]
[TD]Company B[/TD]
[TD]1[/TD]
[TD]volume[/TD]
[TD]5000[/TD]
[/TR]
[TR]
[TD]Company B[/TD]
[TD]1[/TD]
[TD]price[/TD]
[TD]6[/TD]
[/TR]
[TR]
[TD]Company B[/TD]
[TD]2[/TD]
[TD]volume[/TD]
[TD]7[/TD]
[/TR]
[TR]
[TD]Company B[/TD]
[TD]2[/TD]
[TD]price[/TD]
[TD]8000[/TD]
[/TR]
</tbody>[/TABLE]
Any tips and tricks are helpful
Thanks,
Adriaan