title: Return a column number based on the column name in csv file using .find
body: <p>below is a piece of code that works on <code>xlsx</code> files but not on the <code>csv</code> files, at least I suspect so.</p>
  
  <p>The aim of the code is to find a column name e.g. <code>ProductType</code> and return the column number in which the said column name is stored.</p>
  
  <p>Again, this piece of code works perfectly when I run it on <code>xslx</code> file types, however doing so on the <code>csv</code> files does not work.</p>
  
  <p>Any help is appreciated. </p>
  
  <pre><code>Sub ma1()
  
      Dim RA As Excel.Workbook
  
      Set RA = Workbooks.Open("G:\depts\Pri\RA.csv")
  
      RA_col = RA.Sheets(1).Cells.Find(What:="ProductType", MatchCase:=True, LookAt:=xlWhole).Column
  
      Debug.Print (RA_col)
  
  
  End Sub
  </code></pre>