答案 0 :(得分:0)
我认为此代码可以帮助您解决问题
Dim dStart As Date
Dim dEnd As Date
Dim dDate As Date
Dim iCol As Integer
Dim iColDate As Integer
iCol = 2
iColDate = 2
Do While Cells(iCol, 2).Value <> ""
dStart = Format(Cells(iCol, 2).Value, "dd/mm/yyyy")
dEnd = Format(Cells(iCol, 3).Value, "dd/mm/yyyy")
For dDate = dStart To dEnd
Cells(iColDate, 6).Value = dDate
Cells(iColDate, 7).Value = Cells(iCol, 4).Value
iColDate = iColDate + 1
Next
iCol = iCol + 1
Loop