implemented fail messages instead of --

This commit is contained in:
Paul580710 committed 2026-04-21 22:39:22 +02:00
1 parent baddc07108
commit 4d138f7b3b
3 files changed
+12 -9

No files matched your search

+4 -1
View File
@@ -2,5 +2,8 @@
IMPORTRANGE("https://docs.google.com/spreadsheets/d/1MPCIXoBqguYu9oRnwQ2tfYMqY_vY4tS5dJzNF7by3aY/edit?usp=sharing";"'"&Cell("Sheet";date)&"'!B1:S1"); IMPORTRANGE("https://docs.google.com/spreadsheets/d/1MPCIXoBqguYu9oRnwQ2tfYMqY_vY4tS5dJzNF7by3aY/edit?usp=sharing";"'"&Cell("Sheet";date)&"'!B1:S1");
INDEX(IMPORTRANGE("https://docs.google.com/spreadsheets/d/1MPCIXoBqguYu9oRnwQ2tfYMqY_vY4tS5dJzNF7by3aY/edit?usp=sharing";"'"&Cell("Sheet";date)&"'!B2:S40");Day(date)) INDEX(IMPORTRANGE("https://docs.google.com/spreadsheets/d/1MPCIXoBqguYu9oRnwQ2tfYMqY_vY4tS5dJzNF7by3aY/edit?usp=sharing";"'"&Cell("Sheet";date)&"'!B2:S40");Day(date))
=job); =job);
CHOOSECOLS(work; 1) IfNA(
CHOOSECOLS(work; 1);
"No workers planned today"
)
) )
+4 -4
View File
@@ -4,13 +4,13 @@
=job); =job);
If(second="--"; If(second="--";
SWITCH(true; SWITCH(true;
COUNTA(work) = 1; "--"; COUNTA(work) = 1; "Not enough workers planned";
COUNTA(work) >= 2; TEXTJOIN(", ";true;CHOOSECOLS(work;SEQUENCE(1;COUNTA(work)-1;2))); COUNTA(work) >= 2; TEXTJOIN(", ";true;CHOOSECOLS(work;SEQUENCE(1;COUNTA(work)-1;2)));
); );
SWITCH(true; SWITCH(true;
COUNTA(work) = 1; "--"; COUNTA(work) = 1; "Not enough workers planned";
COUNTA(work) = 2; "--"; COUNTA(work) = 2; "Not enough workers planned";
COUNTA(work) >= 3; TEXTJOIN(", ";true;CHOOSECOLS(work;2)); COUNTA(work) >= 3; TEXTJOIN(", ";true;CHOOSECOLS(work;2));
) )
) )
) )
+4 -4
View File
@@ -2,11 +2,11 @@
IMPORTRANGE("https://docs.google.com/spreadsheets/d/1MPCIXoBqguYu9oRnwQ2tfYMqY_vY4tS5dJzNF7by3aY/edit?usp=sharing";"'"&Cell("Sheet";date)&"'!B1:S1"); IMPORTRANGE("https://docs.google.com/spreadsheets/d/1MPCIXoBqguYu9oRnwQ2tfYMqY_vY4tS5dJzNF7by3aY/edit?usp=sharing";"'"&Cell("Sheet";date)&"'!B1:S1");
INDEX(IMPORTRANGE("https://docs.google.com/spreadsheets/d/1MPCIXoBqguYu9oRnwQ2tfYMqY_vY4tS5dJzNF7by3aY/edit?usp=sharing";"'"&Cell("Sheet";date)&"'!B2:S40");Day(date)) INDEX(IMPORTRANGE("https://docs.google.com/spreadsheets/d/1MPCIXoBqguYu9oRnwQ2tfYMqY_vY4tS5dJzNF7by3aY/edit?usp=sharing";"'"&Cell("Sheet";date)&"'!B2:S40");Day(date))
=job); =job);
If(second="--";"--"; If(second="--";"Course not possible";
SWITCH(true; SWITCH(true;
COUNTA(work) = 1; "--"; COUNTA(work) = 1; "Not enough workers planned";
COUNTA(work) = 2; TEXTJOIN(", ";true;CHOOSECOLS(work;2)); COUNTA(work) = 2; TEXTJOIN(", ";true;CHOOSECOLS(work;2));
COUNTA(work) >=3; TEXTJOIN(", ";true;CHOOSECOLS(work;SEQUENCE(1;COUNTA(work)-2;3))); COUNTA(work) >=3; TEXTJOIN(", ";true;CHOOSECOLS(work;SEQUENCE(1;COUNTA(work)-2;3)));
) )
) )
) )