Forum Discussion

Werner_Geiger's avatar
Werner_Geiger
Brass Contributor
Sep 23, 2021
Solved

How to assign and reuse a temporary name within a formula?

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.

2 Replies

Resources