Results 1 to 10 of 10

Modify This Macro To Generate More Than 1048576 Number Sets

Threaded View

  1. #1
    Forum Contributor
    Join Date
    06-29-2011
    Location
    Ottawa, Ontario
    MS-Off Ver
    Excel 2007
    Posts
    107

    Modify This Macro To Generate More Than 1048576 Number Sets

    I have this macro to generate numbers sets once my original number set is matched but the most I can generate is 1048576 sets.

    Can this macro be modified to generate more than 1048576 sets? Either on the same spreadsheet or additional spreadsheets?

    Sub MakeSets()
    Dim Cnt As Long, Cnt2 As Long, NR As Long
    
    Cnt = Application.InputBox("How many sets to create?", "SETS", 2500000, Type:=1)
    If Cnt = 0 Then Exit Sub
    If MsgBox("Clear current sets?", vbYesNo, "RESET") = vbYes Then
        Range("m:p").ClearContents
        NR = 1
    Else
        NR = Range("m" & Rows.Count).End(xlUp).Row + 1
    End If
    
    Do
        Application.Calculate
        If Range("a3").Value = Range("c3").Value Then
            For i = 1 To Cnt
                Range("a1:d1").Copy
                Range("m" & NR).PasteSpecial xlPasteValues
                NR = NR + 1
            Next i
            Exit Do
        End If
        DoEvents
    Loop
    
    Application.CutCopyMode = False
    End Sub
    Last edited by ssjagger; 12-03-2015 at 08:14 PM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 2
    Last Post: 11-03-2014, 12:06 PM
  2. Macro Help - Modify macro to save as to specific location
    By scoochUM in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 01-30-2014, 04:10 PM
  3. Stop Macro, Check Cells & Modify if Necessary, Resume Macro
    By AccountantCost in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-08-2009, 07:39 AM
  4. Replies: 3
    Last Post: 08-11-2008, 09:21 AM
  5. modify macro
    By stevekirk in forum Excel General
    Replies: 4
    Last Post: 04-05-2007, 03:50 AM
  6. Can you modify one macro with another
    By creyavaich in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-05-2007, 06:45 PM
  7. [SOLVED] Modify a macro
    By Philippe Jacquet in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-04-2006, 04:50 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