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
Bookmarks