Datum automatisch in Liste eintragen

  • Excel

Es gibt 1 Antwort in diesem Thema. Der letzte Beitrag () ist von Mono.

    Datum automatisch in Liste eintragen

    SO... ein Problem gelöst taucht das nächste wieder auf :(

    also ich habe eine Liste, in der Mittels Formular ein BeginnDatum und ein EndDatum eingetragen werden.
    Jetzt muss ich in eine Andere Spalte Jedes Datum ab Beginn bis Ende eintragen
    Wäre so etwas möchlich?
    Dateien
    • Mappe1.xlsx

      (19,89 kB, 139 mal heruntergeladen, zuletzt: )

    Visual Basic-Quellcode

    1. Sub PrintDates(BeginDate As Date, EndDate As Date)
    2. Dim curDate As Date
    3. If EndDate < BeginDate Then
    4. Debug.Print ("EndDatum und Beginn Datum vertauscht?")
    5. Else
    6. curDate = BeginDate
    7. Do While curDate <= EndDate
    8. Debug.Print curDate
    9. curDate = DateAdd("d", 1, curDate)
    10. Loop
    11. End If
    12. End Sub


    Statt dem Debug.Print musst du das Datum halt in eine Spalte eintragen.

    LG
    Das ist meine Signatur und sie wird wunderbar sein!