+ Reply to Thread
Results 1 to 4 of 4

Copy, Paste, Move onto next cell...

Hybrid View

  1. #1
    Registered User
    Join Date
    04-08-2007
    Posts
    2

    Copy, Paste, Move onto next cell...

    I have 30 years of streamflow data that is broken into months on the horizontal axis with days and years on the vertical axis. I need to have a continuous set of data with days,months,years all on the vertical axis. I tried to where I copied and pasted each month of a year over, but when I ran the macro it just copied and pasted the same year, not moving onto the next set of data for the next year. Basically I need to figure out how to make it move onto the next set of data once it has completed the first year.
    Thanks... Let me know if this crappy explanation needs further explaining.
    -D

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,524
    Hi,

    check out this thread to see if it is similar to what you are referring to, check out the example

    http://www.excelforum.com/showthread.php?t=595678

    sometimes it's hard to explain if not visualized

  3. #3
    Registered User
    Join Date
    04-08-2007
    Posts
    2

    an example of the problem

    I made a quick example of the problem. Thanks for any help!!! Let me know if you have any other questions.
    -D
    Attached Files Attached Files

  4. #4
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,524
    Hi,
    Give this a try

    Sub MoveStuff()
        Dim I As Integer  
        Range("R6:S65000").ClearContents
        Range("R5") = "Date"
        Range("S5") = "Value"
        Range("R5:S5").Font.Bold = True
        Range("R5:S5").HorizontalAlignment = xlCenter
        Range("D6").Select
        Do Until ActiveCell.Value = ""
            For I = 1 To 12
                ActiveCell.Range("A1:A31").Copy _
                        Destination:=Range("S65536").End(xlUp).Offset(1, 0)
                ActiveCell.Offset(0, 1).Select
            Next I
            ActiveCell.Offset(31, -12).Select
        Loop
        Range("R6").Select
        ActiveCell.FormulaR1C1 = "1/1/1990"
        Range("R6").AutoFill Destination:=Range("R6:R735"), Type:=xlFillDays
        Range("R6").Select
    
    
    End Sub

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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