title: Update VBA Code to look for Partial Filename instead of Exact Filename
body: <p>I have the following code which works well when you look for the exact filename. However, I would like to reference only a partial filename in a specific cell. </p>
  
  <p>I have tried countless different types of code to no avail.</p>
  
  <pre><code>Sub copyfiles()
      Dim xRg As Range, xCell As Range
      Dim xSFileDlg As FileDialog, xDFileDlg As FileDialog
      Dim xSPathStr As Variant, xDPathStr As Variant
      Dim xVal As String
      On Error Resume Next
      Set xRg = Application.InputBox("Please select the file names:", "KuTools For Excel", ActiveWindow.RangeSelection.Address, , , , , 8)
      If xRg Is Nothing Then Exit Sub
      Set xSFileDlg = Application.FileDialog(msoFileDialogFolderPicker)
      xSFileDlg.Title = "Please select the original folder:"
      If xSFileDlg.Show &lt;&gt; -1 Then Exit Sub
      xSPathStr = xSFileDlg.SelectedItems.Item(1) &amp; "\"
      Set xDFileDlg = Application.FileDialog(msoFileDialogFolderPicker)
      xDFileDlg.Title = "Please select the destination folder:"
      If xDFileDlg.Show &lt;&gt; -1 Then Exit Sub
      xDPathStr = xDFileDlg.SelectedItems.Item(1) &amp; "\"
      For Each xCell In xRg
          xVal = xCell.Value
          If TypeName(xVal) = "String" And xVal &lt;&gt; "" Then
              FileCopy xSPathStr &amp; xVal, xDPathStr &amp; xVal
          End If
      Next
  End Sub
  </code></pre>