Problem with macro for positions in SAP BOM

thedogg

Board Regular
Joined
Sep 22, 2015
Messages
154
Hello,

I am looking for macro which is able to exchange levels I have in BOM (downloaded to excel). Do you know easy way how to do it?

Oryginaly I have:


Code:
[TABLE="width: 119"]
<tbody>[TR]
[TD].1[/TD]
[/TR]
[TR]
[TD]..2[/TD]
[/TR]
[TR]
[TD]...3[/TD]
[/TR]
[TR]
[TD]....4[/TD]
[/TR]
[TR]
[TD]....4[/TD]
[/TR]
[TR]
[TD].....5[/TD]
[/TR]
[TR]
[TD]....4[/TD]
[/TR]
[TR]
[TD]...3[/TD]
[/TR]
[TR]
[TD]....4[/TD]
[/TR]
[TR]
[TD]...3[/TD]
[/TR]
[TR]
[TD]...3[/TD]
[/TR]
[TR]
[TD]..2[/TD]
[/TR]
[TR]
[TD]..2[/TD]
[/TR]
[TR]
[TD].1[/TD]
[/TR]
[TR]
[TD]..2[/TD]
[/TR]
[TR]
[TD]...3[/TD]
[/TR]
[TR]
[TD]..2[/TD]
[/TR]
[TR]
[TD]...3[/TD]
[/TR]
[TR]
[TD]..2[/TD]
[/TR]
[TR]
[TD]...3[/TD]
[/TR]
[TR]
[TD]....4[/TD]
[/TR]
[TR]
[TD]..2[/TD]
[/TR]
[TR]
[TD]...3[/TD]
[/TR]
[TR]
[TD]..2[/TD]
[/TR]
[TR]
[TD]...3[/TD]
[/TR]
[TR]
[TD]..2[/TD]
[/TR]
[TR]
[TD]...3[/TD]
[/TR]
[TR]
[TD]..2[/TD]
[/TR]
[TR]
[TD]...3[/TD]
[/TR]
[TR]
[TD]..2[/TD]
[/TR]
[TR]
[TD]...3[/TD]
[/TR]
[TR]
[TD]..2[/TD]
[/TR]
[TR]
[TD]...3[/TD]
[/TR]
[TR]
[TD]..2[/TD]
[/TR]
[TR]
[TD]..2[/TD]
[/TR]
[TR]
[TD]...3[/TD]
[/TR]
[TR]
[TD]..2[/TD]
[/TR]
[TR]
[TD]...3[/TD]
[/TR]
[TR]
[TD]..2[/TD]
[/TR]
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.3
[/TD]
[/TR]
[TR]
[TD]2.3.1
[/TD]
[/TR]
[TR]
[TD]2.4
[/TD]
[/TR]
[TR]
[TD]2.4.1
[/TD]
[/TR]
[TR]
[TD]2.5
[/TD]
[/TR]
[TR]
[TD]2.5.1
[/TD]
[/TR]
[TR]
[TD]2.6
[/TD]
[/TR]
[TR]
[TD]2.6.1
[/TD]
[/TR]
[TR]
[TD]2.7
[/TD]
[/TR]
[TR]
[TD]2.7.1
[/TD]
[/TR]
[TR]
[TD]2.8
[/TD]
[/TR]
[TR]
[TD]2.8.1
[/TD]
[/TR]
[TR]
[TD]2.9
[/TD]
[/TR]
[TR]
[TD]2.9.1
[/TD]
[/TR]
[TR]
[TD]2.10
[/TD]
[/TR]
[TR]
[TD]2.11
[/TD]
[/TR]
[TR]
[TD]2.12
[/TD]
[/TR]
[TR]
[TD]2.13
[/TD]
[/TR]
[TR]
[TD]2.14
[/TD]
[/TR]
[TR]
[TD]2.15
[/TD]
[/TR]
[TR]
[TD]2.16
[/TD]
[/TR]
[TR]
[TD]2.17
[/TD]
[/TR]
[TR]
[TD]2.17.1
[/TD]
[/TR]
[TR]
[TD]2.17.1.1
[/TD]
[/TR]
[TR]
[TD]2.17.2
[/TD]
[/TR]
[TR]
[TD]3
[/TD]
[/TR]
[TR]
[TD]4
[/TD]
[/TR]
[TR]
[TD]4.1
[/TD]
[/TR]
[TR]
[TD]4.2
[/TD]
[/TR]
[TR]
[TD]5
[/TD]
[/TR]
[TR]
[TD]6
[/TD]
[/TR]
[TR]
[TD]7
[/TD]
[/TR]
[TR]
[TD]8
[/TD]
[/TR]
[TR]
[TD]9
[/TD]
[/TR]
[TR]
[TD]10
[/TD]
[/TR]
[TR]
[TD]11
[/TD]
[/TR]
</tbody>[/TABLE]
 
Last edited:

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).

Forum statistics

Threads
1,224,823
Messages
6,181,177
Members
453,021
Latest member
Justyna P

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