creates sheets based on a list and populate only with data where a column matches the sheet name <p>I've been working on having a workbook create sheets and populate those sheets based on values in a pivot table. Through my various searches, I've been able to create sheets based on the list using something similar to this (credit to rizvisa1 on ccm.net):</p> <pre><code>`Sub CreateSheetsFromAList() Dim nameSource As String 'sheet name where to read names Dim nameColumn As String 'column where the names are located Dim nameStartRow As Long 'row from where name starts Dim detailSheet As String 'sales detail sheet name Dim detailRange As String 'range to copy from sales detail sheet Dim nameEndRow As Long 'row where name ends Dim employeeName As String 'employee name Dim newSheet As Worksheet nameSource = "Pivot" nameColumn = "A" nameStartRow = 5 detailSheet = "Pivot" 'this is the range where I want to only copy and paste the rows/records that match the new sheet name detailRange = "A5:D463" 'find the last cell in use nameEndRow = Sheets(nameSource).Cells(Rows.Count, nameColumn).End(xlUp).Row 'loop till last row Do While (nameStartRow &lt;= nameEndRow) 'get the name employeeName = Sheets(nameSource).Cells(nameStartRow, nameColumn) 'remove any white space employeeName = Trim(employeeName) ' if name is not equal to "" If (employeeName &lt;&gt; vbNullString) Then On Error Resume Next 'do not throw error Err.Clear 'clear any existing error 'if sheet name is not present this will cause error to leverage Sheets(employeeName).Name = employeeName If (Err.Number &gt; 0) Then 'sheet was not there, so it create error, so we can create this sheet Err.Clear On Error GoTo -1 'disable exception so to reuse in loop 'add new sheet Set newSheet = Sheets.Add(After:=Sheets(Sheets.Count)) 'rename sheet newSheet.Name = employeeName Application.CutCopyMode = False 'clear clipboard 'copy sales detail Sheets(detailSheet).Range(detailRange).Copy 'paste training material Sheets(employeeName).Cells(1, "A").PasteSpecial Application.CutCopyMode = False End If End If nameStartRow = nameStartRow + 1 'increment row Loop End Sub` </code></pre> <p>The only problem here is that it I've only been copying a static range.</p> <p>My issue is selecting the range where the first column matches the sheet name in order to copy and paste into the newly created sheet. I've tried using <code>For Each</code> where a cell matches the sheet name and copying the entire row, but haven't been able to get the results I need. </p> <p>Here's what I'm trying to do:</p> <p>Take a sheet with the following data in a pivot table: <a href="http://i.stack.imgur.com/4pV68.png" rel="nofollow">Pivot</a></p> <p>And turn it into new sheets with the sheet names from column A, populated with only the data that matches the sheet name like this:</p> <p><a href="http://i.stack.imgur.com/5Ea0s.png" rel="nofollow">New sheets with data</a></p> <p>Any help you can provide would be greatly appreciated.</p>