title: Split Data into Multiple Sheets with VBA
body: <p>The goal is to split my Raw Data into new sheets based on unique values found in 1 column. I found the following VBA code that does what I need however the customer I will be utilizing this for has a locked excel &quot;workbook&quot; that I cannot change the order of the Raw Data columns on. With that being the case, this VBA code utilizes column A however my target column is C.</p>
  <p>The new sheets also seem to name after whatever the target data is but I would like to know how to change this so I can specify a cell for the sheet name.</p>
  <p>Question 1: What part of this code can I change to make the target column C instead of A.
  Question 2: How can I change the .name portion to be the value in AF2 on each sheet?</p>
  <pre><code>Sub parse_data()
  Dim xRCount As Long
  Dim xSht As Worksheet
  Dim xNSht As Worksheet
  Dim I As Long
  Dim xTRrow As Integer
  Dim xCol As New Collection
  Dim xTitle As String
  Dim xSUpdate As Boolean
  Set xSht = ActiveSheet
  On Error Resume Next
  xRCount = xSht.Cells(xSht.Rows.Count, 1).End(xlUp).Row
  xTitle = &quot;A1:AD1&quot;
  xTRrow = xSht.Range(xTitle).Cells(1).Row
  For I = 2 To xRCount
      Call xCol.Add(xSht.Cells(I, 1).Text, xSht.Cells(I, 1).Text)
  Next
  xSUpdate = Application.ScreenUpdating
  Application.ScreenUpdating = False
  For I = 1 To xCol.Count
      Call xSht.Range(xTitle).AutoFilter(1, CStr(xCol.Item(I)))
      Set xNSht = Nothing
      Set xNSht = Worksheets(CStr(xCol.Item(I)))
      If xNSht Is Nothing Then
          Set xNSht = Worksheets.Add(, Sheets(Sheets.Count))
          xNSht.Name = CStr(xCol.Item(I))
      Else
          xNSht.Move , Sheets(Sheets.Count)
      End If
      xSht.Range(&quot;A&quot; &amp; xTRrow &amp; &quot;:A&quot; &amp; xRCount).EntireRow.Copy xNSht.Range(&quot;A1&quot;)
      xNSht.Columns.AutoFit
  Next
  xSht.AutoFilterMode = False
  xSht.Activate
  Application.ScreenUpdating = xSUpdate
  </code></pre>
  <p>End Sub</p>
  <p><em><strong>EDIT TO INCLUDE CUSTOMER TEMPLATE I AM REQUIRED TO USE</strong></em>
  <a href="https://www.dropbox.com/scl/fi/qb9484lmdyeo1aieqlb4m/HDTemplate.xlsx?dl=0&amp;rlkey=6dlt1nlo8lehmnpl8cdipwbkp" rel="nofollow noreferrer">https://www.dropbox.com/scl/fi/qb9484lmdyeo1aieqlb4m/HDTemplate.xlsx?dl=0&amp;rlkey=6dlt1nlo8lehmnpl8cdipwbkp</a></p>