Results 1 to 4 of 4

Need Loop code to Copy data or pass values

Threaded View

  1. #1
    Registered User
    Join Date
    02-17-2012
    Location
    Leicester
    MS-Off Ver
    Excel 2007
    Posts
    2

    Need Loop code to Copy data or pass values

    Hi I have inherited some files that will need to be updated monthly. The data is sales information. The problem is it has gaps in columns and rows that need populating. I have tried using a DO/Loop statement with ActiveCell to do this but can't get the logic right. I have attached a spreadsheet with a dummy example of before and after. Accomplishing this with code will save me hours of work each month.
    As you can see my code is flawed but hopefully you can see what I am trying to accomplish.
    If anyone can help I would be really grateful.

    PHP Code: 
    Sub Copydata()
    Dim MyCell As String
    Dim i 
    As Integer
    'i = 2314
    '
    Do Until IsEmpty(Cells(i2))
    For 
    1 To 2314 Step 1
    Range
    ("c3").Select
    MyCell 
    ActiveCell.Value

    If ActiveCell.Offset(10).Value "" Then
    ActiveCell
    .Offset(10).Select
    ActiveCell
    .Value MyCell
        
    Else: ActiveCell.Offset(10).Select
    MyCell 
    ActiveCell.Value

    End 
    If
    ActiveCell.Offset(10).Select
    1

    Next i
    ActiveCell
    .Offset(10).Select
    End Sub

    Attached Files Attached Files

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