Hi, caladanbrood!

Give a look at the uploaded file.

It uses a few named ranges:

a) InputList1/2/3: fixed, as your input has emtpy cells, columns A:C

=Sheet1!$A$2:$A$100

b) Output1/2/3: dynamic, equal to input without empty cells, columns G:I

=DESREF(Sheet1!$G$1;;;CONTAR.SI(InputList1;"> ")+CONTAR.SI(InputList1;">0");1) -----> in english: =OFFSET(Sheet1!$G$1,,,COUNT.IF(InputList1,"> ")+COUNT.IF(InputList1,">0"),1)

c) OutputX12: dynamic, concatenation of Output1 and Output2 to perform your "nice" sort, column J

=DESREF(Sheet1!$J$1;;;FILAS(OutputList1)+FILAS(OutputList2);1) -----> in english: =OFFSET(Sheet1!$J$1,,,ROWS(OutputList1)+ROWS(OutputList2),1)

d) OutputX12_Num: dynamic, Output12X cleaned from dots & commas and padded with trailing zeros for your "nice" sort and converted to numbers, column K

=DESREF(OutputListX12;;1) -----> in english: =OFFSET(OutputListX12,,1)

e) OutputX12_Rank: dynamic, rank of Output12X_Num, column L

=DESREF(OutputListX12;;2) -----> in english: =OFFSET(OutputListX12,,2)

f) OutputX12_Sort: dynamic, rank of Output12X_Num, column M

=DESREF(OutputListX12;;3) -----> in english: =OFFSET(OutputListX12,,3)

g) OutputX123: dynamic, concatenation of OutputX12_Sort and Output3, column N

=DESREF(Sheet1!$N$1;;;FILAS(OutputListX12)+FILAS(OutputList3);1) -----> in english: =OFFSET(Sheet1!$N$1,,,ROWS(OutputListX12)+ROWS(OutputList3),1)

h) OutputListY: dynamic, concatenation of title, row headers and OutputX123, column P

=DESREF(Sheet1!$P2;;;3+FILAS(OutputListX123);1) -----> in english: =OFFSET(Sheet1!$P2,,,3+ROWS(OutputListX123),1)

The formulas are:

b) G1: =SI.ERROR(INDICE(InputList1;K.ESIMO.MENOR(SI(LARGO(InputList1)>0;FILA(DESREF(InputList1;-1;

);"");FILA(A1)));"") -----> in english: =IFERROR(INDEX(InputList1,SMALL(IF(LEN(InputList1)>0,ROW(OFFSET(InputList1,-1,,)),""),ROW(A1))),"")

H1: idem with InputList2

I1: idem with InputList3

These are array formulas (Remember that array formulas should be entered with

**Ctrl-Shift-Enter** instead of just

**Enter**).

Copy down as required (in the sample file up to row 100, in the actual file, up to the sum of non-empty cells of all 3 input columns).

c) J1: =SI(FILA()<=FILAS(OutputList1);INDICE(OutputList1;FILA());SI(FILA()<=FILAS(OutputList1)+FILAS(OutputList2);INDICE(OutputList2;FILA()-FILAS(OutputList1));"")) -----> in english: =IF(ROW()<=ROWS(OutputList1),INDEX(OutputList1,ROW()),IF(ROW()<=ROWS(OutputList1)+ROWS(OutputList2),INDEX(OutputList2,ROW()-ROWS(OutputList1)),""))

d) K1: =SI(FILA()<=FILAS(OutputListX12);VALOR(IZQUIERDA(SUSTITUIR(SUSTITUIR(J1;",";"");".";"")&REPETIR("0";10);10));"") -----> in english: =IF(ROW()<=ROWS(OutputListX12),VALUE(LEFT(SUBSTITUTE(SUBSTITUTE(J1,",",""),".","")&REPT("0",10),10)),"")

The nested SUBSTITUTE functions can be omitted if input at columns A:B is coherent and accordingly to regional configuration settings' digit separator (i.e., numeric data).

e) L1: =SI(FILA()<=FILAS(OutputListX12);JERARQUIA.EQV(K1;OutputListX12_Num;1);"") -----> in english: =IF(ROW()<=ROWS(OutputListX12),RANK.EQ(K1,OutputListX12_Num,1),"")

f) M1: =SI(FILA()<=FILAS(OutputListX12);INDICE(OutputListX12;COINCIDIR(FILA();OutputListX12_Rank;0));"") -----> in english: =IF(ROW()<=ROWS(OutputListX12),INDEX(OutputListX12,MATCH(ROW(),OutputListX12_Rank,0)),"")

g) N1: =SI(FILA()<=FILAS(OutputListX12);INDICE(OutputListX12_Sort;FILA());SI(FILA()<=FILAS(OutputListX12)+FILAS(OutputList3);INDICE(OutputList3;FILA()-FILAS(OutputListX12));"")) -----> in english: =IF(ROW()<=ROWS(OutputListX12),INDEX(OutputListX12_Sort,ROW()),IF(ROW()<=ROWS(OutputListX12)+ROWS(OutputList3),INDEX(OutputList3,ROW()-ROWS(OutputListX12)),""))

h) P1: Tasks

P2: ="All "&A1

P3: ="All "&B1

P4: ="All "&C1

P5: =SI(FILA()-4<=FILAS(OutputListX123);INDICE(OutputListX123;FILA()-4;1);"") -----> in english: =IF(ROW()-4<=ROWS(OutputListX123),INDEX(OutputListX123,ROW()-4,1),"")

Copy down J1:N1 & P5 down as required (row 100).

Just advise if any issue.

Regards!