harry_ralphson
New Member
- Joined
- Feb 4, 2013
- Messages
- 4
Hi,
I am writing a VBA code to restructure the multilevel BOM dump taken out from SAP. In this data the number of coloumn's are fixed and row numbers are dynamic depending upon the size of BOM data
I have finished with my code, except one part where i am stuck. I tried various things but its not working.
In my data, coloumn A indicates the BOM level, where the BOm levels are listed out. The sequence is random.
Here i want to hide the rows after each "..2" and before ".1" including the "..2" row itself.
I have tried For each, do until options, but its not working.
I am a newbee to VBA.
Any help would be appreciated, Thanks
[TABLE="class: grid, width: 500, align: center"]
<TBODY>[TR]
[TD]BOM Level
[/TD]
[TD]Material
[/TD]
[TD]Qty
[/TD]
[/TR]
[TR]
[TD].1
[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]..2
[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD].1
[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]..2
[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]..2
[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]..2
[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD].1
[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]..2
[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]..2
[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]..2
[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</TBODY>[/TABLE]
I am writing a VBA code to restructure the multilevel BOM dump taken out from SAP. In this data the number of coloumn's are fixed and row numbers are dynamic depending upon the size of BOM data
I have finished with my code, except one part where i am stuck. I tried various things but its not working.
In my data, coloumn A indicates the BOM level, where the BOm levels are listed out. The sequence is random.
Here i want to hide the rows after each "..2" and before ".1" including the "..2" row itself.
I have tried For each, do until options, but its not working.
I am a newbee to VBA.
Any help would be appreciated, Thanks
[TABLE="class: grid, width: 500, align: center"]
<TBODY>[TR]
[TD]BOM Level
[/TD]
[TD]Material
[/TD]
[TD]Qty
[/TD]
[/TR]
[TR]
[TD].1
[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]..2
[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD].1
[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]..2
[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]..2
[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]..2
[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD].1
[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]..2
[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]..2
[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]..2
[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</TBODY>[/TABLE]