在 concat 函数的末尾添加格式化日期

Adding a formatted date on to the end of a concat function

我目前正在寻找以 DD/MM 格式将更新日期添加到当前由现有宏生成的文本字符串的末尾。

Sub Nomediatidy()

 Dim w1 As Worksheet
 Dim w2 As Worksheet
    Dim result As Range
    Dim FirstRow As Integer


    Set w1 = Worksheets("Sheet1")
    Set w2 = Worksheets("Master List")

    FirstRow = 0

    With w1.Range("F:F")
        Set result = .Find(What:="No Media", LookIn:=xlValues, LookAt:=xlPart)

        If Not result Is Nothing Then
            FirstRow = result.Row
            Do
                w1.Range("H" & result.Row) = w1.Range("F" & result.Row) + " Available - PAM/Edit to Advise " & w1.Range("H" & result.Row)
                Set result = .FindNext(result)
            Loop While Not result Is Nothing And result.Row <> FirstRow
        End If
    End With

    Set w1 = Nothing
    Set result = Nothing


Application.ScreenUpdating = True

End Sub

在显示 "Available - PAM/Edit to Advise" 我想添加今天的日期的那一行。但是,我终其一生都无法弄清楚如何在调试器不引发某种错误的情况下将其放入其中。我可能只是想多了,但如有任何建议,我们将不胜感激

改变 w1.Range("H" & result.Row) = w1.Range("F" & result.Row) + " Available - PAM/Edit to Advise " & w1.Range("H" & result.Row)

w1.Range("H" & result.Row) = w1.Range("F" & result.Row) & " Available - PAM/Edit to Advise " & w1.Range("H" & result.Row) & " " & format(now, "DD/MM")

这将在您目前所拥有的内容的末尾添加一个 space,然后在其后跟上来自 now 函数的当前日期,该函数从系统时钟中获取日期和时间。然后将其格式化为仅 "DD/MM"