Hi, zhengzhi8806,
please take a minute to think about the thread title.
Sub Final1()
Dim iRow As Integer
Dim iCol As Integer
Dim temp As Integer
For iRow = 5 To 6
If iRow = 20 Or iRow = 36 Then
'DO NOTHING
Else
For iCol = 6 To 8
temp = Sheets("Scenarios").Cells(3, iCol).Value
Sheets("Plan Attributes").Range("B4").Value = Sheets("Scenarios").Cells(3, iCol).Value
Sheets("Plan Attributes").Range("C62:HJ74").Copy
Sheets("Results").Select
With Cells(2, temp + 2)
If temp = 1 Then
.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Else
.PasteSpecial Paste:=xlPasteValues, Operation:=xlAdd, SkipBlanks _
:=False, Transpose:=False
End If
End With
Next iCol
End If
Next iRow
End Sub
Ciao,
Holger
Bookmarks