N
NetWave128
After I run it; the value are placed in a stair step down, as in th
next range "F8" starts in "H8" its not right....
I would like to run this:
For Each cell In MyRange2
If cell.Value > 0 Then
myrange.Offset(0, x) = cell.Value
x = x + 1
End If
Next cell
down multiple rows...same for each loop...
please help
CODE PASTED BELOW
Sub Benchmark()
Dim myrange As Range
Dim x As Integer
Dim MyRange2 As Range
Dim t As Integer
x = 0
For t = 0 To 44
Set MyRange2 = Sheets("appendix").Range("p7:cq7")
Set MyRange2 = MyRange2.Offset(t, 0)
Set myrange = Sheets("appendix").Range("f7")
Set myrange = myrange.Offset(t, 0)
For Each cell In MyRange2
If cell.Value > 0 Then
myrange.Offset(0, x) = cell.Value
x = x + 1
End If
Next cell
Next t
Set MyRange2 = Nothing
Set myrange = Nothing
End Su
next range "F8" starts in "H8" its not right....
I would like to run this:
For Each cell In MyRange2
If cell.Value > 0 Then
myrange.Offset(0, x) = cell.Value
x = x + 1
End If
Next cell
down multiple rows...same for each loop...
please help
CODE PASTED BELOW
Sub Benchmark()
Dim myrange As Range
Dim x As Integer
Dim MyRange2 As Range
Dim t As Integer
x = 0
For t = 0 To 44
Set MyRange2 = Sheets("appendix").Range("p7:cq7")
Set MyRange2 = MyRange2.Offset(t, 0)
Set myrange = Sheets("appendix").Range("f7")
Set myrange = myrange.Offset(t, 0)
For Each cell In MyRange2
If cell.Value > 0 Then
myrange.Offset(0, x) = cell.Value
x = x + 1
End If
Next cell
Next t
Set MyRange2 = Nothing
Set myrange = Nothing
End Su