Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sub Control()
Workbooks("c:|\bonus.xls").Open Workbooks("c:\departure.xls").Open CopyData 6 CopyData 7 CopyData 12 End SUb Sub CopyData(col as long) Dim iLastRow As Long With Workbooks("bonus.xls").Worksheets("Sheet1") iLastRow = .Cells(.Rows.Count,col).End(xlUp).Row For i = 1 To iLastRow If .Cells(i,col).Value ="0020 DE" Or _ .Cells(i,col).Value = "0021 DE" Then .cells(i,col).entirerow.copy _ Workbooks("departure.xls").Worksheets("Sheet1").ce lls(i,"A") End If Next i End With End SUb -- HTH RP (remove nothere from the email address if mailing direct) "Alen32" wrote in message lkaboutsoftware.com... I want to copy from workbook (C:\bonus.xls) rows where column A equal "0021 DE" or ""0020 DE" and column C equal "DE1100" to workbook(C:\departure.xls) and sheet1. But only rows from colum F,G, and L. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro to copy an image (or picture) from one workbook to a new sheetin another workbook | Excel Worksheet Functions | |||
Excel-how to link source workbook to copy of destination workbook | Excel Worksheet Functions | |||
Copy cells based on conditions in one workbook to another workbook | Excel Discussion (Misc queries) | |||
Need a macro to copy a range in one workbook and paste into another workbook | Excel Programming | |||
Copy a range of cells in an unopened workbook and paste it to the current workbook | Excel Programming |