Thread
:
Simple loop problem
View Single Post
#
1
Posted to microsoft.public.excel.programming
Christy
external usenet poster
Posts: 89
Simple loop problem
Thank you all very much!
"Don Guillett" wrote:
what you are doing here is copying ALL to the same cell instead of the next
available cell.
WorkRange.Value = Sheet1.Cells(i, 1).Value
--
Don Guillett
SalesAid Software
"Christy" wrote in message
...
I have a simple loop that is not working and I just see why. I am trying to
loop through column F and if there is an X in the cell, copy the value
from
column A in the same row to another worksheet. I loop is only picking up
the
last x in column F?
Any help would be greatly appreciated.
Sub DailyList()
Dim WorkRange As Range
Dim i As Integer
Set WorkRange = Sheet3.Range("a300").End(xlUp).Offset(1, 0)
i = 2
For i = 2 To 300 Step 1
If Sheet1.Cells(i, 6) = "x" Then
WorkRange.Value = Sheet1.Cells(i, 1).Value
End If
Next
End Sub
Reply With Quote
Christy
View Public Profile
Find all posts by Christy