InsertRow(1); InsertRow(2); InsertRow(3); currentRow = 3; dependentsRow = currentRow; nextCol = 1; section = ""; dependents = 0; y = 4; while (y <= Bottom) { if (left([1,y], 1) == "[") { section = [1,y]; } else if (section == "[•}—{e‘°]") { if (dependents == 0) { dependents = nextCol; [dependents,1] = section; for (x = 1; [x,y] != ""; x++) { [nextCol,2] = [x,y]; nextCol++; } } for (z = y + 1; [1,z] != ""; z++) { if (z > y + 1) { dependentsRow++; InsertRow(dependentsRow); y++; z++; } for (x = 1; [x,y] != ""; x++) { [dependents + x - 1, dependentsRow] = [x,z]; } } while (left([1,y+1], 1) != "[") { DeleteRow(y); } } else if ([1,y] == "") { currentRow = dependentsRow + 1; dependentsRow = currentRow; InsertRow(currentRow); y++; section = ""; } else { xsection = ""; found = false; for (x = 1; x < nextCol; x++) { if ([x,1] != "") { xsection = [x,1]; } if (section == xsection && [x,2] == [1,y]) { [x,currentRow] = [2,y]; found = true; } } if (!found) { if (xsection != section) { [nextCol,1] = section; } [nextCol,2] = [1,y]; [nextCol,currentRow] = [2,y]; nextCol++; } } DeleteRow(y); }