Need help with loop code

C

confused

Hi

I am having probs with the following coding...

i need to copy sheet 1 to sheet 2 in the following order over any number of
rows...

sheet one =data sheet
sheet two= destination sheet

Sheet 2 - Col A =ref eg AA, auto fill down 11 rows
sheet 1 -

repeat with sheet 1
Range H2:S2 fixed range, copy and pastespecial transpose into sheet 2 col B
then H4:S4 copy and pastespecial transpose into sheet 2, col C
T4:V4 copy an paste special only across cols E,F&G, then auto fill same data
down 11 rows.


Dim row1
Dim row2
row1 = 2
row2 = 3
Do
Sheets("BIF").Select
Range("A2").Select
ActiveCell.FormulaR1C1 = "BB"
Range("D2").Select
ActiveCell.FormulaR1C1 = "PM Budget Input 2007"
Range("B2").Select

Sheets("DATA").Select
Range("H2:S2").Select
Selection.copy
Sheets("BIF").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=True

Range("C2").Select
Sheets("DATA").Select
Range("H3:S3").Select
Application.CutCopyMode = False
Selection.copy
Sheets("BIF").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=True

Range("E2").Select
Sheets("DATA").Select
Range("T3:V3").Select
Selection.copy
Sheets("BIF").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False

Range("A2").Select
Selection.AutoFill Destination:=Range("A2:A13")

Range("D2:G2").Select
Selection.AutoFill Destination:=Range("D2:G13"), Type:=xlFillCopy
Range("D2:G13").Select


row2 = 2 + 1

Loop Until ActiveCell.Value = ""

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top