I have two lists:
list1 = {{1, A, AA}, {2, B, BB}, {3, C, CC}, {4, D, DD}, {6, F, FF}};
list2 = {{1, a, aa}, {1, b, bb}, {1, c, cc}, {2, d, dd}, {2, e, ee}, {3, f, ff},
{3, g, gg}, {3, h, hh}, {4, i, ii}, {4, j, jj}, {4, k, kk}, {4, l, ll},
{4, m, mm}, {5, n, nn}, {5, o, oo}, {7, p, pp}};
I want to merge these two lists. While merging list1 to list2, elements of list1 should be repeated or missing as shown below:
result = {{1, a, aa, A, AA}, {1, b, bb, A, AA}, {1, c, cc, A, AA}, {2, d, dd, B, BB}, {2, e, ee, B, BB}, {3, f, ff, C, CC}, {3, g, gg, C, CC}, {3, h, hh, C, CC}, {4, i, ii, D, DD}, {4, j, jj, D, DD}, {4, k, kk, D, DD}, {4, l, ll, D, DD}, {4, m, mm, D, DD}, {5, n, nn, Missing[], Missing[]}, {5, o, oo, Missing[], Missing[]}, {6, Missing[], Missing[], F, FF}, {7, p, pp, Missing[], Missing[]}};
Any help is greatly appreciated. Similarly, if we can merge above two lists plus the following list in a similar manner in one step, please help me.
list3 = {{2, .2, 20}, {3, .3, 30}, {4, .4, 40}, {5,.5, 50}, {6, .6, 60}};
Thank you all in advance.