![]() |
Copying info from one worksheet to another
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 thi worksheet into WS2 wherever the value in "Grade" Column IS NOT "FAIL" So basically, my macro will copy specific columns from WS1 and past them into specific columns in WS2 if Column "Grade" in WS1 is NO "FAIL" for all entries from row 13 in WS1 The info will be pated into WS2 from row 10 Any clues? Thank -- oscarook ----------------------------------------------------------------------- oscarooko's Profile: http://www.excelforum.com/member.php...fo&userid=2811 View this thread: http://www.excelforum.com/showthread.php?threadid=49530 |
Copying info from one worksheet to another
have a button which loops thru the grade column, if the cellvalue evaluates to not fail then populate an array. When the grade column has been evaluated, goto WS2 and populate with the array! -- MattShoreson ------------------------------------------------------------------------ MattShoreson's Profile: http://www.excelforum.com/member.php...fo&userid=3472 View this thread: http://www.excelforum.com/showthread...hreadid=495306 |
Copying info from one worksheet to another
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 |
All times are GMT +1. The time now is 08:00 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com