Dim A1 As Range, B1 As Range, c1 As Range, Rng As Range, cnt As Integer, x, s1, s2, y, t1, t2, z
Set Rng = Columns("A:A").SpecialCells(xlCellTypeConstants, 23)
cnt = Rng.Count
For x = 1 To cnt / 2
Set A1 = Range("A1")
Set B1 = A1.End(xlDown)
Set c1 = B1.End(xlDown)
t1 = B1 - A1
t2 = B1.Row - A1.Row
z = t1 / t2
s1 = c1 - B1
s2 = c1.Row - B1.Row
y = s1 / s2
If Range("A2") = "" Then
Range(A1, B1).DataSeries Rowcol:=xlColumns, Type:=xlLinear, Date:=xlDay, _
Step:=z, Trend:=False
Else: Range(B1, c1).DataSeries Rowcol:=xlColumns, Type:=xlLinear, Date:=xlDay _
, Step:=(y), Trend:=False
End If
Next x
See attached to see it in action
Bookmarks