Folge dem Video um zu sehen, wie unsere Website als Web-App auf dem Startbildschirm installiert werden kann.
Anmerkung: Diese Funktion ist in einigen Browsern möglicherweise nicht verfügbar.
Public Sub genDates()
'Definitionen
Const C_ADR_FROM = "A1" 'Zelle Start Datum
Const C_ADR_TO = "A2" 'Zelle End Datum
Const C_COL_TARGET = "B" 'Zielspalte
'Informationen auslesen
Dim ws As Worksheet: Set ws = ActiveSheet
Dim fromDate As Date: fromDate = ws.Range(C_ADR_FROM).Value
Dim toDate As Date: toDate = ws.Range(C_COL_TARGET).Value
'Anzahl Tage bestimmen
Dim cntDays As Long: cntDays = DateDiff("d", fromDate, toDate) + 1
'Start Datum übernehmen
ws.Range(C_COL_TARGET & 1).Value = fromDate
'ZielRange definieren
Dim target As Range: Set target = ws.Range(C_COL_TARGET & "1", C_COL_TARGET & cntDays)
'Range mit Datum füllen
target.DataSeries , xlChronological, xlDay
End Sub
'Bedingte Formatierung.
'Formel: =WEEKDAY($B1;2)>=6$
target.FormatConditions.Delete
Dim fc As FormatCondition: Set fc = target.FormatConditions.Add(xlExpression, xlCreatorCode, "=WEEKDAY($" & C_COL_TARGET & "1;2)>=6")
fc.Interior.Color = RGB(125, 125, 125)