This macro will do what you say you want. I assumed the Grade column was
Column F. I also assumed that you want Columns A:G copied and pasted to
Columns A:G in WS2 starting in row 10.
As written, the data will be pasted into WS2 starting in the row that is
immediately below the last entry in Column A from A10 down. HTH Otto
Sub CopyData()
Dim RngGrade As Range
Dim i As Range
Dim Dest As Range
With Sheets("WS2")
If IsEmpty(.Range("A10")) Then
Set Dest = .[A10]
Else
Set Dest = .Range("A" & Rows.Count).End(xlUp).Offset(1)
End If
End With
Set RngGrade = Range("F13", Range("F" & Rows.Count).End(xlUp))
For Each i In RngGrade
If i.Value < "FAIL" Then
Range(Cells(i.Row, 1), Cells(i.Row, 7)).Copy Dest
Set Dest = Dest.Offset(1)
End If
Next i
End Sub
"oscarooko" wrote
in message ...
Hello,
I'm using Excel 2003. I have two worksheets, say WS1 and WS2.
In WS1, I have some columns,and I will need to copy data from this
worksheet into WS2 wherever the value in "Grade" Column IS NOT "FAIL"
So basically, my macro will copy specific columns from WS1 and paste
them into specific columns in WS2 if Column "Grade" in WS1 is NOT
"FAIL" for all entries from row 13 in WS1
The info will be pated into WS2 from row 10
Any clues?
Thanks
--
oscarooko
------------------------------------------------------------------------
oscarooko's Profile:
http://www.excelforum.com/member.php...o&userid=28116
View this thread: http://www.excelforum.com/showthread...hreadid=495306