Created
May 9, 2018 00:45
-
-
Save TGDUY/6733928021e3109d105c71be00019eb3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sub MinhDang() | |
Dim StartDate As Date, TMP() As Date, Totalday As Long, I As Long | |
With Sheet1 | |
StartDate = CDate(.Range("A1").Value)'Ngày bắt đầu tính từ ô A1 | |
Totalday = CLng(.Range("B1").Value)' Số ngày cần điền | |
.Range("C1:C1048576").ClearContents 'Xóa dữ liệu cột C | |
For I = 1 To Totalday ' Vòng lăọ chạy từ 1 tới tổng số ngày | |
.Range("C" & I) = StartDate + I - 1 '' Điền dữ liệu vào cột C | |
Next | |
End With | |
End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment