Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
copy cells
I need to copy cells from one worksheet to
another [same workbook], based on two conditions. The conditions are simple, e.g. ISBLANK($A30) and $C30="OPEN", etc. The original column has 200 entries. Only 50 of them may be copied in consecutive cells in a column on the new worksheet. Thanks for any help. Atul |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
copy cells
Sub CopyData()
Dim rng as Range, sh as worksheet Dim rw as Long, cell as Range with worksheets(1) set rng = .range(.cells(2,1),.cells(2,1).End(xldown)) End with set sh = Worksheets(2) rw = 2 for each cell in rng if len(trim(cell)) = 0 and cell.offset(0,2) = "OPEN" then cell.Entirerow.copy sh.Cells(rw,1) rw = rw + 1 end if Next End sub -- Regards, Tom Ogilvy "AM" wrote: I need to copy cells from one worksheet to another [same workbook], based on two conditions. The conditions are simple, e.g. ISBLANK($A30) and $C30="OPEN", etc. The original column has 200 entries. Only 50 of them may be copied in consecutive cells in a column on the new worksheet. Thanks for any help. Atul |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How can I copy big ranges of cells without drag or copy/paste? | Excel Discussion (Misc queries) | |||
Copy and paste versus copy and insert copied cells | New Users to Excel | |||
macro needed to copy blocks of cells across to list of cells down | Excel Programming | |||
Copy/Paste how to avoid the copy of formula cells w/o calc values | Excel Discussion (Misc queries) | |||
Copy data into cells until changes trigger new copy | Excel Programming |