title: Importing excel data
body: <p>I have an excel file with data in column A - ZZ, I am needing to import columns E,F,G,I into a table within a word document. I don't want to use mail merge as I want the data all within the same table within word. Can anyone give me any pointers? I have been looking for a while and testing code unsuccessfully.</p>
  <pre><code>Sub Macro1()
  
  Dim rowCount2 As Long, shtSrc As Worksheet
  Dim shtDest As Worksheet
  Dim rng2 As Range
  
  
            
      Set shtSrc = Sheets(&quot;Roadmap&quot;)
      Set shtDest = ActiveDocument.Range(1)
  
      rowCount2 = shtSrc.Cells(Rows.Count, &quot;A&quot;).End(xlUp).Row
           
      Set rng2 = shtSrc.Range(&quot;A1:A&quot; &amp; rowCount2)
         
      
      currentRow = 2
  
      For Each cell2 In rng2.Cells
          If cell2.Value &lt;&gt; &quot;&quot; Then
              shtDest.Range(&quot;B&quot; &amp; currentRow).Value2 = cell2.Value2
              shtDest.Range(&quot;C&quot; &amp; currentRow).Value2 = cell2.Offset(0, 1).Value2
              shtDest.Range(&quot;G&quot; &amp; currentRow).Value2 = cell2.Offset(0, 2).Value2
              shtDest.Range(&quot;H&quot; &amp; currentRow).Value2 = cell2.Offset(0, 3).Value2
              shtDest.Range(&quot;J&quot; &amp; currentRow).Value2 = cell2.Offset(0, 4).Value2
              currentRow = currentRow + 1
                  
          ElseIf cell2.Value = &quot;&quot; Then
       
          End If
          Next cell2
          
      
  End Sub
  </code></pre>