我正在尝试仅将 yahoo 函数的值打印到第 39 个单元格中,输入来自工作表的第一列。该函数返回一个字符串。Evaluate、.Value 和 .Formula 不适合我。我收到多个错误和语法错误。任何输入将不胜感激!我是VBA的新手。
Sub Button2_Click()
Dim LastRow As Long
If Range("A5") <> vbNullString And Range("A6") <> vbNullString Then
LastRow = Range("A5").End(xlDown).Row
End If
With Range("AN5:AN" & LastRow)
Dim texttmp As String: textmp = Evaluate("yahoo(RC[-39])")
'.FormulaR1C1 = "=yahoo(RC[-39])"
'.FormulaR1C1 = "yahoo(MID(RC[-39],1,LEN(RC[-39]))"
'.Value2 = "=yahoo(RC[-39])"
'.Value = "yahoo"
'.Value2 = Evaluate("yahoo(RC[-39])")
End With
End Sub