Hi there, I hope someone can help me with a solution for this, i'm pretty new to vba and excel formulas.

I have a 1 worksheet that is populated manually, which is connected to another dynamically populating sheet, this is working no problem, my problem comes when trying to assign the values I want in the second sheet in a hierarchy

example:

sheet1 has the following column headings: column A: Type of page/post, column B: category

Type of posts include Page, Subpage, Pillar Post,post etc
categories includes, topic 1, topic2, topic3, apples etc

now on sheet 2 what im trying to achieve is a hierarchy like the following

for example:

Column A: 1.0 column B: Page Column C: topic1
column A: 1.1 column B: Pillar Page Column C: topic1
column A: 1.1.1 column B: Pillar Post Column C: topic1
Column A: 1.1.1.1 column B: Post Column C: topic1

this is now the part where it gets complicated... depending on sheet 1's selection of page/post type, if the type already exists in sheet 2, then column A value if the post type of page would change to 2.0 if the only other page value in column A was 1.0

now this is the part that really stumps me! say for example 1.0, 2.0, 3.0, 4.0 already exist (pages) but pillar post is selected in sheet 1 then if it's say for example the second pillar post it should populate in the row below 2.0 as 2.1 which means the formula needs to insert a row between already populated cells

here is an example:

Column A: 1.0 column B: Page Column C: topic1
column A: 1.1 column B: Pillar Page Column C: topic1
column A: 1.1.1 column B: Pillar Post Column C: topic1
Column A: 1.1.1.1 column B: Post Column C: topic1
Column A: 2.0 column B: Page Column C: topic2
Column A: 2.1 column B: Pillar Post Column C: topic2 - this row is inserted due to it being the second pillar post in the list and being topic 3
column A: 3.0 column B: Page Column C: topic3
column A: 4.0 column B: Page Column C: apples

Would appreciate any help on trying to get this to work, ive tried with formulas IF, And OR etc, but because im having to insert a row between cells that are already populated im stumped! PLEASE HELP.

Much thanks in advance

Nick