title: New to VBA programming and need help to Optimize VBA code
body: <p>Good Evening...</p>
  
  <p>I am very new to VBA... have only been playing with it for about a week, and need to help to optimize a macro.</p>
  
  <p>Currently it takes about 23 seconds for it to run... and was hoping to get it down a bit.</p>
  
  <p>First step is a push button to "select file location"
  then one table from the DB is downloaded into a worksheet called "hidden" and finally columns B:L are copied from "hidden" to "UPS Tariff"</p>
  
  <p>Any suggestions are greatly appreciated</p>
  
  <pre><code>Sub Selectfile()
  
  Dim filename As String
  
  filename = Application.GetOpenFilename(MultiSelect:=False)
  
  Range("c2") = filename
  
  Dim StartTime As Double
  Dim SecondsElapsed As Double
  StartTime = Timer
  
  Dim cnn As ADODB.Connection
  Dim rs As ADODB.Recordset
  Dim sQRY As String
  Dim rng As Range
  Dim cell As Range
  Dim sourcefile As String
  
  
  sourcefile = Sheet1.Range("C2")
  Sheets("Hidden").Visible = True
  Set cnn = New ADODB.Connection
  Set rs = New ADODB.Recordset
  Set rng = Sheet9.Range("B1:B762")
  
  cnn.Open "Provider=Microsoft.ACE.OLEDB.12.0;" &amp; _
  "Data Source=" &amp; sourcefile &amp; ";"
  sQRY = "SELECT * FROM Tariff"
  rs.CursorLocation = adUseClient
  rs.Open sQRY, cnn, adOpenStatic, adLockReadOnly
  Application.ScreenUpdating = False
  Sheet9.Range("A1").CopyFromRecordset rs
  rs.Close
  Set rs = Nothing
  cnn.Close
  Set cnn = Nothing
  
  For Each cell In rng
  If cell &lt;&gt; "Letter" And cell &lt;&gt; "NDA" And cell &lt;&gt; "NDAS" And cell &lt;&gt; "2DA" And cell &lt;&gt; "3DS" And cell &lt;&gt; "GND" Then cell.Value = cell.Value * 1
  Next cell
  
      Sheets("Hidden").Select
      Range("B1").Select
      Range(Selection, Selection.End(xlToRight)).Select
      Range(Selection, Selection.End(xlDown)).Select
      Selection.Copy
      Sheets("UPS Tariff").Select
      Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
          :=False, Transpose:=False
      Range("A1").Select
      Sheets("Hidden").Select
      Range("A1").Select
      Range(Selection, Selection.End(xlToRight)).Select
      Range(Selection, Selection.End(xlDown)).Select
      Application.CutCopyMode = False
      Selection.Clear
      Sheets("Info").Select
  
  Sheets("Hidden").Visible = xlVeryHidden
  SecondsElapsed = Round(Timer - StartTime, 2)
  
  'Notify user in seconds
    MsgBox "This code ran successfully in " &amp; SecondsElapsed &amp; " seconds", vbInformation
  
  End Sub
  </code></pre>