Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,090
Default 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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copying info from worksheet to worksheet if info matches Carrach Excel Worksheet Functions 2 May 6th 10 09:52 AM
copying info from one workbook to another one Mago Excel Worksheet Functions 1 April 7th 09 11:49 PM
Copied info from Excel worksheet, but pasted info won't work in fo KRISTENV Excel Discussion (Misc queries) 3 January 8th 09 03:13 PM
Copying info entered on one worksheet automatically to another Mpls501sMan Excel Discussion (Misc queries) 0 December 8th 05 04:36 PM
Copying info from one sheet to another Erik[_6_] Excel Programming 5 February 26th 04 11:51 PM


All times are GMT +1. The time now is 12:19 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"