Hi,
This thread has emerged from my previous unsuccessful thread. I have changed my approach. Hope this time it will work.
In sheet1, I am trying to copy Certain cells or rows based on cell value in column K ( K 200 :K 305) if the value is equal to 1.... The respective rows or cells to be copied are from M200: S305.
These are to be pasted to same sheet at columns A to G in the next free row available.
I have tried various things and they don't work....
The code that I would use is as follows:
Sub_CopyOnlyOne()
Dim sourceRng As Range
Dim cell As Range
Dim i As Long
Set sourceRng = ActiveSheet.Range("K200:K305")
i = 1
For Each cell In sourceRng
If cell.Value = 1 Then
cell.Resize(1, 5).Copy Destination:=Range("A76:G190" & i)
'this is a problem area
i = i + 1
End If
Next cell
End Sub
I have attached the book as well....
Many thanks
Regards
Bookmarks