+ Reply to Thread
Results 1 to 4 of 4

Help with a simple macro - copy data into a column

Hybrid View

  1. #1
    Registered User
    Join Date
    01-11-2007
    Posts
    17

    Help with a simple macro - copy data into a column

    Ok i need a simple macro that copies a range of data into a specified column specified by a combobox. I think it's very simple for experts
    Thanx
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    01-09-2007
    Posts
    59
    Here is a very basic solution using the controls you set up.

    Sub copy()
    
    With Worksheets("Sheet1")
        .Range("D9:F11").ClearContents
        If .Cells(3, 10).Value = 1 Then
            .Cells(9, 4) = .Cells(5, 3)
            .Cells(10, 4) = .Cells(6, 3)
            .Cells(11, 4) = .Cells(7, 3)
        ElseIf .Cells(3, 10).Value = 2 Then
            .Cells(9, 5) = .Cells(5, 3)
            .Cells(10, 5) = .Cells(6, 3)
            .Cells(11, 5) = .Cells(7, 3)
        ElseIf .Cells(3, 10).Value = 3 Then
            .Cells(9, 6) = .Cells(5, 3)
            .Cells(10, 6) = .Cells(6, 3)
            .Cells(11, 6) = .Cells(7, 3)
        End If
    End With
    
    End Sub
    ska

  3. #3
    Forum Expert
    Join Date
    12-29-2004
    Location
    Michigan, USA
    MS-Off Ver
    2013
    Posts
    2,208
    See if this works.
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    01-11-2007
    Posts
    17
    Yes both works perfectly.
    Thnx ska67can, thnx jasoncw :D

+ 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