My spreadsheet contains information about companies and is structured ledger-like in this way:
Company Quarter Revenues EBITDA
A 2010.1 5 1
A 2010.2 6 1
B 2010.1 10 2
B 2010.2 12 3
B 2010.3 20 5
A 2010.3 8 2
B 2011.1 14 3
A 2010.3 8 2
A 2010.4 7 2
A 2011.1 9 1
I want:
a formula (not GAS) that will show me a list of duplicates for the combination Company-Quarter. In the above example, there are two entries for Company A for Quarter 2010.3. In the data there could be multiple duplicates.
a formula (not GAS) that give me missing Company-quarters for a given quarters range for all companies that have at least one entry in the date range (or alternatively, from a pre-determined list of Companies). In the above example, for the range 2010.1 to 2011.1, there is no entry for Company B in 2010.4. In the data there could be multiple missing information.
Ideally, I won't need to create auxiliary columns and is all contained in one formula, so as to make the spreadsheet more elegant.
--- xxx ---
Thanks to @Tedinoz answer below, I came down to a one-cell formula, copied here for future reference:
=unique(sort(arrayformula(if(arrayformula(isna(vlookup(unique(arrayformula(transpose(split(join("", arrayformula(rept(filter(UNIQUE(A2:A), len(UNIQUE(A2:A)))&char(9999), counta(transpose(split(join("", arrayformula(rept(filter(arrayformula(unique(mid(query(B2:B),1,4))), len(arrayformula(unique(mid(query(B2:B),1,4)))))&char(9999), counta(arrayformula(unique(mid(query(B2:B),6,1))))))), char(9999))) )))), char(9999))) &" "&transpose(split(rept(join(char(9999), filter(arrayformula((transpose(split(join("", arrayformula(rept(filter(arrayformula(unique(mid(query(B2:B),1,4))), len(arrayformula(unique(mid(query(B2:B),1,4)))))&char(9999), counta(arrayformula(unique(mid(query(B2:B),6,1))))))), char(9999))) )&"."&(transpose(split(rept(join(char(9999), filter(arrayformula(unique(mid(query(B2:B),6,1))), len(arrayformula(unique(mid(query(B2:B),6,1))))))&char(9999), counta(arrayformula(unique(mid(query(B2:B),1,4))))), char(9999))))), len(arrayformula((transpose(split(join("", arrayformula(rept(filter(arrayformula(unique(mid(query(B2:B),1,4))), len(arrayformula(unique(mid(query(B2:B),1,4)))))&char(9999), counta(arrayformula(unique(mid(query(B2:B),6,1))))))), char(9999))) )&"."&(transpose(split(rept(join(char(9999), filter(arrayformula(unique(mid(query(B2:B),6,1))), len(arrayformula(unique(mid(query(B2:B),6,1))))))&char(9999), counta(arrayformula(unique(mid(query(B2:B),1,4))))), char(9999))))))))&char(9999), counta(arrayformula(unique(mid(query(B2:B),1,4))))), char(9999))))),arrayformula(A2:A&" "&B2:B),1,0))),unique(arrayformula(transpose(split(join("", arrayformula(rept(filter(UNIQUE(A2:A), len(UNIQUE(A2:A)))&char(9999), counta(transpose(split(join("", arrayformula(rept(filter(arrayformula(unique(mid(query(B2:B),1,4))), len(arrayformula(unique(mid(query(B2:B),1,4)))))&char(9999), counta(arrayformula(unique(mid(query(B2:B),6,1))))))), char(9999))) )))), char(9999))) &" "&transpose(split(rept(join(char(9999), filter(arrayformula((transpose(split(join("", arrayformula(rept(filter(arrayformula(unique(mid(query(B2:B),1,4))), len(arrayformula(unique(mid(query(B2:B),1,4)))))&char(9999), counta(arrayformula(unique(mid(query(B2:B),6,1))))))), char(9999))) )&"."&(transpose(split(rept(join(char(9999), filter(arrayformula(unique(mid(query(B2:B),6,1))), len(arrayformula(unique(mid(query(B2:B),6,1))))))&char(9999), counta(arrayformula(unique(mid(query(B2:B),1,4))))), char(9999))))), len(arrayformula((transpose(split(join("", arrayformula(rept(filter(arrayformula(unique(mid(query(B2:B),1,4))), len(arrayformula(unique(mid(query(B2:B),1,4)))))&char(9999), counta(arrayformula(unique(mid(query(B2:B),6,1))))))), char(9999))) )&"."&(transpose(split(rept(join(char(9999), filter(arrayformula(unique(mid(query(B2:B),6,1))), len(arrayformula(unique(mid(query(B2:B),6,1))))))&char(9999), counta(arrayformula(unique(mid(query(B2:B),1,4))))), char(9999))))))))&char(9999), counta(arrayformula(unique(mid(query(B2:B),1,4))))), char(9999))))),""))))