I cannot find the error(s) in this code. What I am trying to do is insert the formula in the column S, when "CN Equity" is used in the column A. I want the macro to run from row 6 to 69.
Sub fx()
Dim x As Long
x = 6
Do
If InStr(1, (Range("A" & x).Value), "CN Equity") > 0 Then
Sheets("Sheet1").Range("S" & x).Formula = "=BDP("CADUSD BGN Curncy","LAST_PRICE")" & x
End If
x = x + 1
Loop Until x = 70
End Sub