Results 1 to 4 of 4

Paste a range X number of times based on InputBox Value divided by 4

Threaded View

  1. #1
    Registered User
    Join Date
    03-01-2013
    Location
    Garden Grove, California
    MS-Off Ver
    Excel 2010
    Posts
    4

    Paste a range X number of times based on InputBox Value divided by 4

    This is what I'm trying to do:

    Sub TicketNum()
    	TicketNum = Application.InputBox(Prompt:=
    	"Please Enter the Amount of Openings" , Type:=1)
    	Range("J2,U2,J20,U20").Value = TicketNum.Value
    
    ' If amount entered is less than 4 no need to copy
    	If TicketNum.Value > 4 Then
    End Sub
    
    Function TicketDivide()
    
    ' If amount entered is greater than 4 I need to divide by 4 to see how many pages to make
    
    	TicketDivide = (TicketNum.Value) / 4
    End Function
    
    Sub MorePages()
    
    ' For each whole value returned by the TicketDivide Function copy the range and paste to the next 
    ' empty page.
    	
    	Range("A1:U35").Select
    	Selection.Copy
    
    ' Here is where I'm drawing a blank because I need to paste the Selection x number of times 
    ' and I need to count 1 of TicketNum.Value, 2 of TicketNum.Value, 3 of TicketNum.Value, 4 of ' TicketNum.Value, 5 of TicketNum.Value...etc. and place the count into 
    ' the tickets also. For example: "1 of","2 of", "3 of", "4 of", "5 of"... would be in the cell
    ' Range("I2,T2,I20,T20,I36") respectively once x amount of ticket pages were pasted.
    I have attached a copy of the workbook that I'm creating this for. Any help would be greatly appreciated.
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 1
    Last Post: 07-18-2013, 10:11 AM
  2. Copy a row and paste it a number of times based on a cell value
    By glrubens in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 05-02-2013, 12:37 PM
  3. [SOLVED] count the number of times a string occurs in a range based on a condition
    By sshishirkumar in forum Excel General
    Replies: 6
    Last Post: 05-29-2012, 04:00 AM
  4. VBA; copy paste number of times based on cell value
    By photopidge in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-25-2011, 03:17 AM
  5. Inputbox error? 10 divided by 100 equals 0.100000001490116 ???
    By staying in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-09-2005, 05:05 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