title: How to provide a variable in the for loop to loop through a range
body: <pre><code>Dim FromRang As Range, ToRang As Range
  Dim UserCell As Range
  'Ask the user to input the cell Range in which to search for the sub strings
      Set FromRang = Application.InputBox(Prompt:="Enter Search Range From:", Type:=8)
      Set ToRang = Application.InputBox(Prompt:="Enter Search Range To:", Type:=8)
  
  For each UserCell in ("FromRang:ToRang")
  </code></pre>
  
  <p>giving type mismatch error</p>
  
  <p>Please help..</p>