使用Range.DataSeries 的数据插值

我有一些基于date的数据,我试图插入(水平)之间。 看到下面的图片,我发现一些类似答案的代码,但是当我适应它,它不是插值。 每行的起点和终点都等于0.例如第3行,9月15日。

我在哪里错了?

Sub interpolateData() Dim rng As Range With Sheets("Timeline") Set rng = .Cells(8, 4) Do While CBool(Application.CountIf(.Rows(8), 0)) With .Range(rng, rng.End(xlToRight)) .DataSeries rowCol:=xlRows, Type:=xlLinear, _ Step:=(.Cells(.Cells.Count).Value2 - .Cells(1).Value2) / (.Columns.Count - 1) End With Set rng = .Cells(8, 4).End(xlToRight) Loop End With End Sub 

在这里输入图像说明