Hi Team,
Please assist to make R1C1 formula dynamic. Thanks
Below are my code my attempted Code.getting error at formula.
Sub R1C1_Dynamic()
Dim wbk As Workbook
Dim wsh As Worksheet
Dim mwbk As Workbook
Dim msh As Worksheet
Set mwbk = ThisWorkbook
Set msh = mwbk.Worksheets("Sheet1")
Set wbk = Workbooks.Open(msh.Range("c6").Value)
Set wsh = wbk.Worksheets("Sheet1")
Dim lr As Long
lr = wsh.Range("a1").CurrentRegion.Rows.Count
wsh.Activate
wsh.Range("d2:d"& lr).FormulaR1C1 = "=CONCATENATE((RC[-3]&" "&RC[-2]))"
End Sub
Thanks
Mallesh
Please assist to make R1C1 formula dynamic. Thanks
Below are my code my attempted Code.getting error at formula.
Sub R1C1_Dynamic()
Dim wbk As Workbook
Dim wsh As Worksheet
Dim mwbk As Workbook
Dim msh As Worksheet
Set mwbk = ThisWorkbook
Set msh = mwbk.Worksheets("Sheet1")
Set wbk = Workbooks.Open(msh.Range("c6").Value)
Set wsh = wbk.Worksheets("Sheet1")
Dim lr As Long
lr = wsh.Range("a1").CurrentRegion.Rows.Count
wsh.Activate
wsh.Range("d2:d"& lr).FormulaR1C1 = "=CONCATENATE((RC[-3]&" "&RC[-2]))"
End Sub
Thanks
Mallesh