title: Excel VBA: Convert Cells to Range using Address
body: <p>I am building a module to import text into an Excel workbook. After it imports, I want to format the data as a table. The problem I have is that the import will never have the same range. </p>
  
  <p>I'm using the following code, but it throws an error, Run-time error '424': Object required.</p>
  
  <pre><code>Sub ImportRange()
  
    Dim ws As Worksheet
    Dim lRow As Long
    Dim lCol As Long
    Dim rng As Range
  
    Set ws = ThisWorkbook.Worksheets("Import")
  
    lRow = ws.UsedRange.Row - 1 + ws.UsedRange.Rows.Count
    lCol = ws.UsedRange.Column - 1 + ws.UsedRange.Columns.Count
  
    Set rng = ws.Cells(lRow, lCol).Address(True, True)
  
    'MsgBox Cells(lRow, lCol).Address(True, True)
  
  End Sub
  </code></pre>
  
  <p>I've done quite a bit of searching, but I have been unable to find an answer or figure out how I should be doing this.</p>
  
  <p>The end result would look something like this in the code with the start of the range always being set to $A$1:</p>
  
  <pre><code>ws.ListObjects.Add(xlSrcRange, Range("$A$1:$AM$90"), , xlYes).Name = _
      "Import"
  </code></pre>