Passing cell values in user defined function in range
<pre><code>Sub PlaceOrd()
    Dim i As Long
    For i = 2 To 52
        Range("Y" &amp; i).FormulaR1C1 = _
            "=PlaceRegularOrder(Range("A" &amp; i), Range("B" &amp; i), ""BUY"", ""SL"", Range("W" &amp; i), ""MIS"", Range("Q" &amp; i), Range("Q" &amp; i))"
    Next i
End Sub
</code></pre>

<p>The above code throws an Error "Expected:End of Statement". Please tell me how can I handle this. In the above code "A", "B", "W" and "Q" are columns. But If I  represent "A" as ""A"" then the code is showing no error but A B W and Q are taken as text. How to rectify this</p>

<p>My function (PlaceRegularOrder(....)) should be place in Y2, Y3..... Y52 using loop. Some Values to be taken from "A", "B", "W" and "Q". Please let me know how can I do that</p>