Results 1 to 4 of 4

Looking for way to: Copy/Paste range of cells to another worksheet based on matching crite

Threaded View

  1. #1
    Registered User
    Join Date
    11-25-2013
    Location
    Australia
    MS-Off Ver
    Excel 2007
    Posts
    5

    Looking for way to: Copy/Paste range of cells to another worksheet based on matching crite

    I've looked at similar posts but have to post this as a new question as they didn't solve my issue:

    I have a file with names down column B in sheet 1 and want to transfer all cells C to AA in the row associated with specific names in column B of this sheet to worksheet 2 which is set up with all the same headings and just a limited selection of names from sheet 1. I can write a macro to copy the data but need to get the macro to look for the name in the cell in sheet 2 where I have the name I want the data transferred for. How do I get it to do this for each new cell I go to for which I want to extract the data from sheet 1 - can anyone help please?

    I can't see how to attach my file (Can't see paper clip?? or "manage attachments" button.... )

    I created this macro but need to replace "Andrew Dibby" with the name in the cell I'm in:


    Sub CopyDataForName()
    '
    ' CopyDataForName Macro
    '
    ' Keyboard Shortcut: Ctrl+Shift+Y
    '
        Sheets("2B 2014 Proposed Class List").Select
        Application.CutCopyMode = False
        ActiveCell.FormulaR1C1 = "Andrew Dibby"
        Sheets("1B 2013 data").Select
        Cells.Find(What:="Andrew Dibby", After:=ActiveCell, LookIn:=xlFormulas, _
            LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
            MatchCase:=False, SearchFormat:=False).Activate
        ActiveCell.Offset(0, 1).Range("A1:Y1").Select
        Selection.Copy
        Sheets("2B 2014 Proposed Class List").Select
        ActiveCell.Offset(0, 1).Range("A1").Select
        ActiveSheet.Paste
    End Sub
    I've attached file with 2nd sheet open and now want to copy the data for - say - "David Bell" from sheet 1, where I have the second row duplicated by the above macro for "Andrew Dibby". Hope someone can please help! Thanks, Mary
    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: 11-25-2013, 09:30 AM
  2. [SOLVED] Help with Macro to Copy/Paste cells to different worksheet based on Value
    By BehrBrew in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 11-25-2013, 06:41 AM
  3. Copy/Paste range of cells to another worksheet based on matching criteria
    By maa50904 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-05-2013, 12:07 AM
  4. Copy & Paste Range of Cells Based On Combo Box Value
    By medihx in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-30-2011, 04:43 PM
  5. Copy range from worksheet based on data in a column and paste to end of another ws
    By DavyNixon in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-18-2005, 01:29 PM

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