Hello,
I am prety new to VBA and i was wondering if its possible to use a String as part of a formula like the example below.
Sub Test()
Dim IT_FR_IT_Rate As String
IT_FR_IT_Rate = Range("A1").Value - A1 containts the excel file name Filename.xslx.
Range("A2").Select
ActiveCell.Formula = _
"=INDEX('C:\Path\path2\""& IT_FR_IT_Rate &""'!Target_EUR_Difd,1,0)"
End Sub
If not, how could i make this work. The file name should be stored in a cell, so that it can be easily changed.
Note that the destination excel file is closed.
Thank you in advance.
I am prety new to VBA and i was wondering if its possible to use a String as part of a formula like the example below.
Sub Test()
Dim IT_FR_IT_Rate As String
IT_FR_IT_Rate = Range("A1").Value - A1 containts the excel file name Filename.xslx.
Range("A2").Select
ActiveCell.Formula = _
"=INDEX('C:\Path\path2\""& IT_FR_IT_Rate &""'!Target_EUR_Difd,1,0)"
End Sub
If not, how could i make this work. The file name should be stored in a cell, so that it can be easily changed.
Note that the destination excel file is closed.
Thank you in advance.