Sub AssignElementsToRanges2()
Dim myMap As XmlMap
Dim strXPath As String
Dim xDataFile As String
Dim ws1 As Worksheet
Dim LastRow As Long
Dim lColumn As Long
Dim UsedRange As Range
On Error Resume Next
Set ws1 = Sheets("Schedule A - Part I")
xDataFile = Application.GetOpenFilename
Set myMap = ActiveWorkbook.XmlMaps("ReturnState_Map")
strXPath = "/ns1:ReturnState/ns1:ReturnDataState/ns1:SchA-U/ns1:MemberAType/ns1:MemberHeader/ns1:UnitaryFEIN"
ws1.Range("N6").XPath.SetValue myMap, strXPath
ThisWorkbook.XmlMaps("ReturnState_Map").Import xDataFile
LastRow = ws1.Cells(Rows.Count, 14).End(xlUp).Row
CopyTransposed Sheets("Schedule A - Part I").Range("N6:N" & LastRow), Sheets("Schedule A - Part I").Range("N6")
ws1.Range("N7:N" & LastRow).ClearContents
strXPath = "/ns1:ReturnState/ns1:ReturnDataState/ns1:SchA-U/ns1:MemberAType/ns1:MemberHeader/ns1:MemberFEIN"
ws1.Range("N7").XPath.SetValue myMap, strXPath
ThisWorkbook.XmlMaps("ReturnState_Map").Import xDataFile
LastRow = ws1.Cells(Rows.Count, 14).End(xlUp).Row
CopyTransposed Sheets("Schedule A - Part I").Range("N7:N" & LastRow), Sheets("Schedule A - Part I").Range("N7")
ws1.Range("N8:N" & LastRow).ClearContents
UsedRange = ws1.UsedRange
UsedRange.Columns.AutoFit
End Sub