+ Reply to Thread
Results 1 to 11 of 11

VBA Create Array For New Worksheets

Hybrid View

  1. #1
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: VBA Create Array For New Worksheets

    Another one using your favourite topic
    Sub AddSheetsmine()
    
        Application.ScreenUpdating = False
        
        Dim dic As Object, bottomB As Long
        Dim rng As Range
        Dim ws As Worksheet
        
          Set dic = CreateObject("scripting.dictionary")
          dic.CompareMode = 1
        Set ws = Sheets("All Data")
        
        bottomB = ws.Range("B" & Rows.Count).End(xlUp).Row
    
        For Each rng In ws.Range("B8:B" & bottomB)
             If Not dic.exists(rng) Then dic.Item(rng) = Empty
                 If Not Evaluate("ISREF('" & rng & "'!A1)") Then
                        Worksheets.Add(After:=Worksheets(Worksheets.Count)).Name = rng
                 End If
        Next rng
    End Sub
    Last edited by AB33; 08-23-2014 at 01:55 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 6
    Last Post: 09-25-2013, 10:08 PM
  2. Create an array based off values in another array - exclude blanks
    By clifton1230 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-05-2013, 05:35 PM
  3. [SOLVED] Create 1-col array identifying occurrence count in a 1-col array
    By empsall in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-26-2013, 12:50 PM
  4. Replies: 0
    Last Post: 10-13-2012, 10:13 PM
  5. [SOLVED] How to make an array of workbooks made up of an array of worksheets?
    By 111StepsAhead in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-16-2012, 08:33 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1