Anzeige
Anzeige
HERBERS
Excel-Forum (Archiv)
20+ Jahre Excel-Kompetenz: Von Anwendern, für Anwender
Anzeige
Inhaltsverzeichnis

Formatierungsproblem

Forumthread: Formatierungsproblem

Formatierungsproblem
17.02.2025 21:30:38
Reinhold
Hallo Excel-Freunde!

Habe ein Problem mit der Datums-Formatierung und komm nicht weiter:
Habe ein Eingabeformular min Eingebaefeldern u.a. auch mit Datum.
In der zugehörigen Tabelle wird in Spalte 1 das Datum zwar übernommen,
jedoch in Spalte 2 bräuchte ich das 'Jahr' aus dem Datum
und in Spalte 3 das 'Monat' gesplittet

ActiveSheet.Cells(last, 1).Value = Format(Eingabe.CB_Datum, "dd.mm.yyyy")
ActiveSheet.Cells(last, 2).Value = Format(Eingabe.CB_Datum, "yyyy")
ActiveSheet.Cells(last, 3).Value = Format(Eingabe.CB_Datum, "mmm")

Im Jahresfeld bekomme ich nur den Wert '1905'
Der Fehler liegt also, dene ich im Formular trotz "dd.mm.yyyy"
Kann mir jemand bitte weiterholfen
danke im Voraus
Anzeige

4
Beiträge zum Forumthread
Beiträge zu diesem Forumthread

Betreff
Datum
Anwender
Anzeige
AW: Formatierungsproblem
17.02.2025 21:37:34
Ulf
Hi,
    ActiveSheet.Cells(last, 1).Value = Format(CVDate(Eingabe.CB_Datum), "dd.mm.yyyy")

ActiveSheet.Cells(last, 2).Value = Format(CVDate(Eingabe.CB_Datum), "yyyy")
ActiveSheet.Cells(last, 3).Value = Format(CVDate(Eingabe.CB_Datum), "mmm")

hth
Ulf
AW: Formatierungsproblem
17.02.2025 22:22:51
Onur
"Der Fehler liegt also, dene ich im Formular trotz "dd.mm.yyyy" " ??? Was heisst das?
Anzeige
AW: Formatierungsproblem
17.02.2025 23:58:39
Daniel
Hi
der Fehler dürfte sein, dass deine zweite Spalte auch noch als Datum formatiert ist, bzw mit dem Zahlenformat "JJJJ" / "YYYY".
und die Zahl 2025 ist als Datum der 17. Juli 1905. (2025 Tage ab dem 1.1.1900, der in Excel den Wert 1 hat)
formatiere die Spalte mit dem Zahlenformat Standard.

Gruß Daniel
Anzeige
AW: Formatierungsproblem
18.02.2025 17:43:26
Reinhold
an euch 3!
Danke vielmals. hat geklappt
Anzeige
Anzeige
Live-Forum - Die aktuellen Beiträge
Datum
Titel
14.05.2026 13:31:09
14.05.2026 09:50:42
13.05.2026 19:14:18