Sep 23 2021 10:13 AM
If you have a complex formula, e.g. (Sorry for German language. Should be understandable anyway:(
=WENN(ISTZAHL(
VERGLEICH(FALSCH;BEREICH.VERSCHIEBEN(daten;1;0;ZEILEN(daten)-1)>=daten;0));
"Datum nicht sortiert! Z(" &
VERGLEICH(FALSCH;BEREICH.VERSCHIEBEN(daten;1;0;ZEILEN(daten)-1)>=daten;0)+1+HeadRow & ")";"")
then it would be nice to assign a temporay name tmp and reuse it. This would look like:
=WENN(ISTZAHL(
tmp=VERGLEICH(FALSCH;BEREICH.VERSCHIEBEN(daten;1;0;ZEILEN(daten)-1)>=daten;0));
"Datum nicht sortiert! Z(" &
tmp+1+HeadRow & ")";"")
Is this possible?
ps: This example searches a column daten for the first not ascending element.
Sep 23 2021 10:33 AM
SolutionSep 23 2021 11:42 AM
@Jan Karel Pieterse
Great, thanks a lot! This does the job:
=LET(tmp; VERGLEICH(FALSCH;BEREICH.VERSCHIEBEN(daten;1;0;ZEILEN(daten)-1)>=daten;0);
WENN(ISTZAHL(tmp);"Datum nicht sortiert! Z(" & tmp+1+HeadRow & ")";""))
I think I read about this (new) LET before but forgot about it.
Sep 23 2021 10:33 AM
Solution