Clever-Excel-Forum

Normale Version: Datumsformel falsch
Du siehst gerade eine vereinfachte Darstellung unserer Inhalte. Normale Ansicht mit richtiger Formatierung.
Hi @all,

wo ist der Fehler in der Formel. Der rote Bereich wird falsch dargestellt.

Arbeitsblatt mit dem Namen '2019|2020 (2)'
BC
1WocheDatum
2Datum01.01.1900
305.08. - 11.0805.08.2019
405.08. - 11.0806.08.2019
505.08. - 11.0807.08.2019
605.08. - 11.0808.08.2019
705.08. - 11.0809.08.2019
812.08. - 18.0810.08.2019
912.08. - 18.0811.08.2019
1012.08. - 18.0812.08.2019
1112.08. - 18.0813.08.2019
1212.08. - 18.0814.08.2019
1312.08. - 18.0815.08.2019
1412.08. - 18.0816.08.2019
1519.08. - 25.0817.08.2019
1619.08. - 25.0818.08.2019
1719.08. - 25.0819.08.2019

ZelleFormel
C2=D2*4/3*24
B3=WENN(C3="";"";TEXT(C3+2-REST(C3;7);"TT.MM.")&" - "&TEXT(C3+8-REST(C3;7);"TT.MM"))
B4=WENN(C4="";"";TEXT(C4+2-REST(C4;7);"TT.MM.")&" - "&TEXT(C4+8-REST(C4;7);"TT.MM"))
B5=WENN(C5="";"";TEXT(C5+2-REST(C5;7);"TT.MM.")&" - "&TEXT(C5+8-REST(C5;7);"TT.MM"))
B6=WENN(C6="";"";TEXT(C6+2-REST(C6;7);"TT.MM.")&" - "&TEXT(C6+8-REST(C6;7);"TT.MM"))
B7=WENN(C7="";"";TEXT(C7+2-REST(C7;7);"TT.MM.")&" - "&TEXT(C7+8-REST(C7;7);"TT.MM"))
B8=WENN(C8="";"";TEXT(C8+2-REST(C8;7);"TT.MM.")&" - "&TEXT(C8+8-REST(C8;7);"TT.MM"))
B9=WENN(C9="";"";TEXT(C9+2-REST(C9;7);"TT.MM.")&" - "&TEXT(C9+8-REST(C9;7);"TT.MM"))
B10=WENN(C10="";"";TEXT(C10+2-REST(C10;7);"TT.MM.")&" - "&TEXT(C10+8-REST(C10;7);"TT.MM"))
B11=WENN(C11="";"";TEXT(C11+2-REST(C11;7);"TT.MM.")&" - "&TEXT(C11+8-REST(C11;7);"TT.MM"))
B12=WENN(C12="";"";TEXT(C12+2-REST(C12;7);"TT.MM.")&" - "&TEXT(C12+8-REST(C12;7);"TT.MM"))
B13=WENN(C13="";"";TEXT(C13+2-REST(C13;7);"TT.MM.")&" - "&TEXT(C13+8-REST(C13;7);"TT.MM"))
B14=WENN(C14="";"";TEXT(C14+2-REST(C14;7);"TT.MM.")&" - "&TEXT(C14+8-REST(C14;7);"TT.MM"))
B15=WENN(C15="";"";TEXT(C15+2-REST(C15;7);"TT.MM.")&" - "&TEXT(C15+8-REST(C15;7);"TT.MM"))
B16=WENN(C16="";"";TEXT(C16+2-REST(C16;7);"TT.MM.")&" - "&TEXT(C16+8-REST(C16;7);"TT.MM"))
B17=WENN(C17="";"";TEXT(C17+2-REST(C17;7);"TT.MM.")&" - "&TEXT(C17+8-REST(C17;7);"TT.MM"))
Diese Tabelle wurde mit Tab2Html (v2.5.0) erstellt. ©Gerd alias Bamberg
Hallo Conny
=rest(c3;7) liefert für Sa.-Fr. die Werte 0 - 6
Du brachst aber für Mo.-So. die Werte 0-6
Ich würde Wochentag verwenden, für B3
=WENN(C4="";"";TEXT(C3-WOCHENTAG(C3;3);"TT.MM.")&" - "&TEXT(C3+6-WOCHENTAG(C3;3);"TT.MM"))

Gruß Holger
Moin

Ziehe jeweils 2 Tage ab:

Code:
(C3+2-2-REST(C3-2;7))

(C3+8-2-REST(C3-2;7))
Hi Holger,

die Formel funktioniert, wenn ich C4 in C3 ändere.

=WENN(C4="";"";TEXT(C3-WOCHENTAG(C3;3);"TT.MM.")&" - "&TEXT(C3+6-WOCHENTAG(C3;3);"TT.MM"))