Ich habe in der Spalte a1 mehrere Daten vom Jahr,
nun schaue ich in welchem Quartal ich bin und die Daten in der Spalte 1 , die im Q4 liegen sollen in die Zelle (Z,10) (z=1)
Z=Z+1
For z1 = 1 To Cells(65536, 1).End(xlUp).Row
If WorksheetFunction.RoundUp(Month(CDate(Cells(z1, 5))) / 3, 0) = 4 Then 'Formel zur Ermittlung des Quartals
z2 = z2 + 1
Cells(z2, 8) = Cells(z1, 1) 'Date
Cells(z2, 9) = Cells(z1, 2) 'Settlement
End If
Next
Sub Unit()
Dim arr As Variant, C As Range, min As Date, max As Date, z As Long
min = #10/1/2022#
max = #12/31/2022#
With Cells(1).CurrentRegion
ReDim arr(1 To .Rows.Count, 1 To 1)
For Each C In .Columns(1).Cells
If IsDate(C.Text) Then
If C >= min And C
Gruß Gerd