Adding New Data to Table with Inconsistent Entries Using VBA

Curious George_1

New Member
Joined
Jul 25, 2024
Messages
1
Office Version
  1. Prefer Not To Say
Hello, everyone,

The project I am working on deals with documents that are structured in a Parent-Child relationship (basically the Parent Document controls the Child Document).

To keep things simple there are four levels (Lv1, Lv2, Lv3, Lv4).

Lv1 is Parent to Lv2,
Lv2 is Parent to Lv3,
Lv3 is Parent to Lv4,
Lv4 is Child to Lv3.

To help keep track of what documents controls what, the documents have been sorted into a "Structure Table". But as you can see, there is a lot of blank spaces. (Please note, uploaded this on my phone and had to split image into two, sorry for any inconveniences).

Here is a little more context that might help explain what I am actually trying to achieve.

I will need to insert/place a new row based on a few criteria: Type, Block Number, Family, and Last Modifier.

The Type will determine what Level the document is and the Modifier is used to list the document (fyi, lower the modifier, the older the document is). See attached image for reference.

The Document will also be sorted into a particular Family. The Block Number is used to list Lv1 documents. See attached image for reference.

I do have the documents listed in a separate workbook table and have developed a code for adding a new row with data at the bottom of the table but in this format, it's difficult to see what documents control what.

Ultimately, what I am trying to accomplish, is to use either a UserForm or some sort of Macro that will allow me to place a row in the "Structured Table" depending on the criteria that was given.

For context, the "Structured Table" I am referencing is the image with the BLACK boxes with WHITE letters (theses boxes are to be considered new entries that were added after executing the VBA code).

Please let me know if any other information is needed.
 

Attachments

  • 1000001150.png
    1000001150.png
    86 KB · Views: 13
  • 1000001151.png
    1000001151.png
    55.9 KB · Views: 14
  • 1000001159.png
    1000001159.png
    130.1 KB · Views: 13
  • 1000001152.png
    1000001152.png
    230.3 KB · Views: 13
  • 1000001161.png
    1000001161.png
    204 KB · Views: 12
  • 1000001162.png
    1000001162.png
    224.4 KB · Views: 13

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college

Forum statistics

Threads
1,223,879
Messages
6,175,148
Members
452,615
Latest member
bogeys2birdies

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