J
Jerry
Hi,
This program takes values from 5 arrays, pastes them (line
by line) into a model, then picks up the bottom line of
the model and pastes this bottom line into some results
columns. Here the problem: The model has 4 output numbers
(sheet2 B8:B11). However, the macro only picks up these 4
numbers for the first input line (row 6). After this, the
macro only picks up the number in sheet1 cell B8 (and not
B9:B11 as it is intended to do). What is wrong with the
macro?
Thanks,
Jerry
Sub Model()
Dim cell As Range
For Each cell In Worksheets("sheet1").Range("N6:N325")
cell.Resize(1, 5).Copy
With Worksheets("sheet2")
.Range("B2").PasteSpecial Transpose:=True
cell.Offset(0, -5).Value = .Range("B8:B11").Value
End With
Next
End Sub
This program takes values from 5 arrays, pastes them (line
by line) into a model, then picks up the bottom line of
the model and pastes this bottom line into some results
columns. Here the problem: The model has 4 output numbers
(sheet2 B8:B11). However, the macro only picks up these 4
numbers for the first input line (row 6). After this, the
macro only picks up the number in sheet1 cell B8 (and not
B9:B11 as it is intended to do). What is wrong with the
macro?
Thanks,
Jerry
Sub Model()
Dim cell As Range
For Each cell In Worksheets("sheet1").Range("N6:N325")
cell.Resize(1, 5).Copy
With Worksheets("sheet2")
.Range("B2").PasteSpecial Transpose:=True
cell.Offset(0, -5).Value = .Range("B8:B11").Value
End With
Next
End Sub