Ned help About<p align=left><font face=Arial size=2></font> </p> <p>[code]</p> <p align=left> </p> <p align=left>Sub PagesByDescription()</p> <p align=left>Dim rRange As Range, rCell As Range</p> <p align=left>Dim wSheet As Worksheet</p> <p align=left>Dim wSheetStart As Worksheet</p> <p align=left>Dim strText As String</p> <p align=left> </p> <p align=left>    Set wSheetStart = ActiveSheet</p> <p align=left>    wSheetStart.AutoFilterMode = False</p> <p align=left>    'Set a range variable to the correct item column</p> <p align=left>    Set rRange = Range(&quot;A1&quot;, Range(&quot;A65536&quot;).End(xlUp))</p> <p align=left>    </p> <p align=left>        'Delete any sheet called &quot;UniqueList&quot;</p> <p align=left>        'Turn off run time errors &amp; delete alert</p> <p align=left>        On Error Resume Next</p> <p align=left>        Application.DisplayAlerts = False</p> <p align=left>        Worksheets(&quot;UniqueList&quot;).Delete</p> <p align=left>        </p> <p align=left>        'Add a sheet called &quot;UniqueList&quot;</p> <p align=left>        Worksheets.Add().Name = &quot;UniqueList&quot;</p> <p align=left>        </p> <p align=left>           'Filter the Set range so only a unique list is created</p> <p align=left>            With Worksheets(&quot;UniqueList&quot;)</p> <p align=left>                rRange.AdvancedFilter xlFilterCopy, , Worksheets(&quot;UniqueList&quot;).Range(&quot;A1&quot;), True</p> <p align=left>                 </p> <p align=left>                 'Set a range variable to the unique list, less the heading.</p> <p align=left>                 Set rRange = .Range(&quot;A2&quot;, .Range(&quot;A65536&quot;).End(xlUp))</p> <p align=left>            End With</p> <p align=left>            </p> <p align=left>            On Error Resume Next</p> <p align=left>            With wSheetStart</p> <p align=left>                For Each rCell In rRange</p> <p align=left>                  strText = rCell</p> <p align=left>                 .Range(&quot;A1&quot;).AutoFilter 1, strText</p> <p align=left>                    Worksheets(strText).Delete</p> <p align=left>                    'Add a sheet named as content of rCell</p> <p align=left>                    Worksheets.Add().Name = strText</p> <p align=left>                    'Copy the visible filtered range _</p> <p align=left>                    '(default of Copy Method) and leave hidden rows</p> <p align=left>                    .UsedRange.Copy Destination:=ActiveSheet.Range(&quot;A1&quot;)</p> <p align=left>                    ActiveSheet.Cells.Columns.AutoFit</p> <p align=left>                Next rCell</p> <p align=left>            End With</p> <p align=left>            </p> <p align=left>        With wSheetStart</p> <p align=left>            .AutoFilterMode = False</p> <p align=left>            .Activate</p> <p align=left>        End With</p> <p align=left>        </p> <p align=left>        On Error GoTo 0</p> <p align=left>        Application.DisplayAlerts = True</p> <p align=left>End Sub</p> <p align=left><br>[/code]</p> <p align=left> </p> <p align=left>I ned a code that can group all the same type of words togther in the excel after grouping them up will be able to create new worksheets for the same type of groups words </p> <p align=left> </p> <p align=left>example :abl 0212,abl 0212, bbl 0201,bbl 0202</p> <p align=left> </p> <p align=left>abl all togther and bbl all togther </p> <p align=left> </p> <p align=left>the above code i can made the word of the type create a new worksheets for it but unable to group it all the same type of words togther.</p>© 2009 Microsoft Corporation. All rights reserved.Wed, 10 Dec 2008 23:25:30 Zb9e5d37b-8000-4850-be66-1e7c30fa1387http://social.msdn.microsoft.com/Forums/en-US/isvvba/thread/b9e5d37b-8000-4850-be66-1e7c30fa1387#b9e5d37b-8000-4850-be66-1e7c30fa1387http://social.msdn.microsoft.com/Forums/en-US/isvvba/thread/b9e5d37b-8000-4850-be66-1e7c30fa1387#b9e5d37b-8000-4850-be66-1e7c30fa1387kill99http://social.msdn.microsoft.com/Profile/en-US/?user=kill99Ned help About<p align=left><font face=Arial size=2></font> </p> <p>[code]</p> <p align=left> </p> <p align=left>Sub PagesByDescription()</p> <p align=left>Dim rRange As Range, rCell As Range</p> <p align=left>Dim wSheet As Worksheet</p> <p align=left>Dim wSheetStart As Worksheet</p> <p align=left>Dim strText As String</p> <p align=left> </p> <p align=left>    Set wSheetStart = ActiveSheet</p> <p align=left>    wSheetStart.AutoFilterMode = False</p> <p align=left>    'Set a range variable to the correct item column</p> <p align=left>    Set rRange = Range(&quot;A1&quot;, Range(&quot;A65536&quot;).End(xlUp))</p> <p align=left>    </p> <p align=left>        'Delete any sheet called &quot;UniqueList&quot;</p> <p align=left>        'Turn off run time errors &amp; delete alert</p> <p align=left>        On Error Resume Next</p> <p align=left>        Application.DisplayAlerts = False</p> <p align=left>        Worksheets(&quot;UniqueList&quot;).Delete</p> <p align=left>        </p> <p align=left>        'Add a sheet called &quot;UniqueList&quot;</p> <p align=left>        Worksheets.Add().Name = &quot;UniqueList&quot;</p> <p align=left>        </p> <p align=left>           'Filter the Set range so only a unique list is created</p> <p align=left>            With Worksheets(&quot;UniqueList&quot;)</p> <p align=left>                rRange.AdvancedFilter xlFilterCopy, , Worksheets(&quot;UniqueList&quot;).Range(&quot;A1&quot;), True</p> <p align=left>                 </p> <p align=left>                 'Set a range variable to the unique list, less the heading.</p> <p align=left>                 Set rRange = .Range(&quot;A2&quot;, .Range(&quot;A65536&quot;).End(xlUp))</p> <p align=left>            End With</p> <p align=left>            </p> <p align=left>            On Error Resume Next</p> <p align=left>            With wSheetStart</p> <p align=left>                For Each rCell In rRange</p> <p align=left>                  strText = rCell</p> <p align=left>                 .Range(&quot;A1&quot;).AutoFilter 1, strText</p> <p align=left>                    Worksheets(strText).Delete</p> <p align=left>                    'Add a sheet named as content of rCell</p> <p align=left>                    Worksheets.Add().Name = strText</p> <p align=left>                    'Copy the visible filtered range _</p> <p align=left>                    '(default of Copy Method) and leave hidden rows</p> <p align=left>                    .UsedRange.Copy Destination:=ActiveSheet.Range(&quot;A1&quot;)</p> <p align=left>                    ActiveSheet.Cells.Columns.AutoFit</p> <p align=left>                Next rCell</p> <p align=left>            End With</p> <p align=left>            </p> <p align=left>        With wSheetStart</p> <p align=left>            .AutoFilterMode = False</p> <p align=left>            .Activate</p> <p align=left>        End With</p> <p align=left>        </p> <p align=left>        On Error GoTo 0</p> <p align=left>        Application.DisplayAlerts = True</p> <p align=left>End Sub</p> <p align=left><br>[/code]</p> <p align=left> </p> <p align=left>I ned a code that can group all the same type of words togther in the excel after grouping them up will be able to create new worksheets for the same type of groups words </p> <p align=left> </p> <p align=left>example :abl 0212,abl 0212, bbl 0201,bbl 0202</p> <p align=left> </p> <p align=left>abl all togther and bbl all togther </p> <p align=left> </p> <p align=left>the above code i can made the word of the type create a new worksheets for it but unable to group it all the same type of words togther.</p>Tue, 26 Aug 2008 08:11:47 Z2008-08-26T08:11:47Zhttp://social.msdn.microsoft.com/Forums/en-US/isvvba/thread/b9e5d37b-8000-4850-be66-1e7c30fa1387#6b22dbc5-6f32-4d00-8d98-17c09ea8c1cehttp://social.msdn.microsoft.com/Forums/en-US/isvvba/thread/b9e5d37b-8000-4850-be66-1e7c30fa1387#6b22dbc5-6f32-4d00-8d98-17c09ea8c1cekill99http://social.msdn.microsoft.com/Profile/en-US/?user=kill99Ned help About<p align=left><font face=Arial size=2>so is there an1 can help me wif this problem?</font></p>Thu, 28 Aug 2008 02:36:51 Z2008-08-28T02:36:51Z