title: Translating an entire column in excel and pasting results in the next column
body: <p>Translating an entire column in excel and pasting results in the next column.My code is as follows:</p>
  
  <pre><code>Sub test()
  Dim s, r As Range, l As String
  
  For Each s In Range("A2:A3").Cells
          l = s
          **Range("B2:B3").Cells = translate_using_vba(s, l)**
  
       Next s
  
  End Sub
  
  
  Public Function translate_using_vba(str, l) As String
  ' Tools Refrence Select Microsoft internet Control
      Dim IE As Object, i As Long, j As Long
      Dim inputstring As String, outputstring As String, text_to_convert As String, result_data As String, CLEAN_DATA
      Set IE = CreateObject("InternetExplorer.application")
      '   TO CHOOSE INPUT LANGUAGE
      inputstring = "auto"
      '   TO CHOOSE OUTPUT LANGUAGE
      outputstring = "en"
  
      text_to_convert = str
      'open website
      IE.Visible = False
      IE.navigate "http://translate.google.com/#" &amp; inputstring &amp; "/" &amp;outputstring &amp; "/" &amp; text_to_convert
      Do Until IE.ReadyState = 4
          DoEvents
      Loop
      Application.Wait (Now + TimeValue("0:00:5"))
      Do Until IE.ReadyState = 4
          DoEvents
      Loop
  
      CLEAN_DATA = Split(Application.WorksheetFunction.Substitute(IE.Document.getElementById("result_box").innerHTML, "&lt;/SPAN&gt;", ""), "&lt;")
  
      For j = LBound(CLEAN_DATA) To UBound(CLEAN_DATA)
          result_data = result_data &amp; Right(CLEAN_DATA(j), Len(CLEAN_DATA(j)) - InStr(CLEAN_DATA(j), "&gt;"))
      Next   
  
      IE.Quit
      translate_using_vba = result_data
  
  
  End Function
  </code></pre>
  
  <p>Question: It works fine but my result in column B is overwritten each time. How can I can store B2 value first and then move to B3?</p>