markwilliams2004
MIS
- Feb 20, 2008
- 36
I am trying to write an excel macro that will copy a range called "Data" on sheet 1 into a series of sheets that are indicated by a range called "CountryNames" on sheet 2. So for each sheet I want to copy the information to there is an entry in the range containing that sheet name.
I cannot simply copy to all sheets in the workbook since not all sheets need the information copied over.
Any help is greatly appreciated. Relatively new to this VBA world.
I have copied some code to give an idea of what I am trying to do. I would like to have it loop through the names in a range to post to that named sheet.
range("A2:E7897").Select ---> This is a named range "Data"
application.CutCopyMode = False
selection.copy
Sheets("Other International").Select
range("A7").Select
selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("International Eliminations").Select
range("A7").Select
selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("European Support").Select
range("A7").Select
selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
End Sub
I cannot simply copy to all sheets in the workbook since not all sheets need the information copied over.
Any help is greatly appreciated. Relatively new to this VBA world.
I have copied some code to give an idea of what I am trying to do. I would like to have it loop through the names in a range to post to that named sheet.
range("A2:E7897").Select ---> This is a named range "Data"
application.CutCopyMode = False
selection.copy
Sheets("Other International").Select
range("A7").Select
selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("International Eliminations").Select
range("A7").Select
selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("European Support").Select
range("A7").Select
selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
End Sub