Hello All,
I have never done programming in VB so this is fairly new, had done some PB programming more than 20 years ago but can't remember anything . I exhausted in-built sort option Excel provides for what I want to achieve.
I need some help in restructuring data that I download frequently from a website for products and upload them after updating prices and some other information. The issue I run into is that some of the parent and child records are scattered and I often have to manually move the rows to make updates resulting in hours of lost time. Since we download and upload it frequently I think it makes sense to write a macro for restructuring the rows.
Here's an example of the data that we download:
<tbody>
</tbody>
ID is just a running number when each new product is created in the system. Parent col is empty when it's a parent record, if it has ID in it then it's a child product and it's linked to the Parent product. In this case, I'd like the code to move rows 4 and 5 from above table below row 1, example below:
<tbody>
</tbody>
I'm using Office 2016 version.
Thanks in advance!
I have never done programming in VB so this is fairly new, had done some PB programming more than 20 years ago but can't remember anything . I exhausted in-built sort option Excel provides for what I want to achieve.
I need some help in restructuring data that I download frequently from a website for products and upload them after updating prices and some other information. The issue I run into is that some of the parent and child records are scattered and I often have to manually move the rows to make updates resulting in hours of lost time. Since we download and upload it frequently I think it makes sense to write a macro for restructuring the rows.
Here's an example of the data that we download:
ID | Short Desc | Parent | Reg Price | Sale Price | lots of other cols. |
660 | Product 1 | ... | |||
661 | Product 2 | ... | |||
662 | 661 | 45 | 40 | ... | |
663 | 660 | 50 | 44 | ... | |
664 | 660 | 44 | 23 | ... | |
665 | Product 3 | ... | |||
666 | 661 | 55 | 55 | ||
667 | 661 | 12 | 11 | ... | |
668 | 665 | 10 | 9 | ... | |
... | ... | ... | ... | ... |
<tbody>
</tbody>
ID is just a running number when each new product is created in the system. Parent col is empty when it's a parent record, if it has ID in it then it's a child product and it's linked to the Parent product. In this case, I'd like the code to move rows 4 and 5 from above table below row 1, example below:
ID | Short Desc | Parent | Reg Price | Sale Price |
660 | Product 1 | |||
663 | 660 | |||
664 | 660 | |||
661 | Product 2 | |||
662 | 661 | |||
666 | 661 | |||
667 | 661 | |||
665 | Product 3 |
<tbody>
</tbody>
I'm using Office 2016 version.
Thanks in advance!