첫 번째 매크로를 작성하고 특정 열의 값을 기반으로 특정 행을 선택하는 방법에 대한 질문이 있습니다.Excel 매크로 : 열 날짜를 기준으로 특정 행 선택
Sub Pipeline()
'Module 3
'Iterating through the Funding Date Column and looking for clients going live within 30 days
'Selecting the rows for each client in that target range
'TODO: Export information into an email template in Outlook
'TODO: Send email to distribution list
Dim fundingDate As range
Set fundingDate = range("M4:M500")
Dim todaysDate As Date
todaysDate = Date
For Each cell In fundingDate
If cell < todaysDate + 30 Then
'Need to select the entire row
Else
cell.Font.ColorIndex = 3
End If
Next
End Sub
이것이 첫 번째 매크로라고 말했기 때문에, 여기에 힌트가 있습니다 : 항상'Option Explicit'을 사용하십시오 (이것을 모듈의 첫 번째 줄로 넣으십시오). 이렇게하면 변수를 _all_ 선언 할 수 있습니다. –