Results 1 to 11 of 11

Macro (button) to copy and paste selected cells from one row to another row with text

Threaded View

  1. #1
    Registered User
    Join Date
    01-29-2012
    Location
    Netherland
    MS-Off Ver
    2010
    Posts
    9

    Macro (button) to copy and paste selected cells from one row to another row with text

    Hello all,

    i have a problem with an excel sheet and i'm new to VBA programming.
    I found allready out how to replace cells in my sheet.
    What i now look for is to copy first the cells i replace.

    example i have in cell J3 (B1) (B1=Batch1) and in cell L3 the name who takes the batch.
    so in line F14, F18, F22, F26 is filled in B1; what i need is that all filled cells with B1 from row F will be coppied into the fiels in row J = J14, J18, J22, J26.
    how can i get this running.
    The cells can change and the batches can also change; example B2=Batch2; B3=Batch3 and so on


    here my code right now:

    Sub Picker()
    '
    ' Test1 Macro
    ' Batch Picker to Field Picker & Field Picker to field Packer
    '
    
        Cells.Replace What:=Range("J3"), Replacement:=Range("L3"), lookAt:=xlPart, _
        SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
        ReplaceFormat:=False
    
        Range("F14").Select
        Range("J14").Select
        Range("J3").Select
        Selection.ClearContents
        Range("L3").Select
        Selection.ClearContents
    End Sub
    Last edited by NBVC; 02-02-2012 at 02:42 PM. Reason: add code tags for newbie PM rule

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