searching and copying

G

goalman55

Does anyone know a way that I can search a worksheet down column C, when it
is blank see if column A in the corresponding row has a number, if it does,
copy the entire row A through M and paste it on another sheet then do the
same thing on the next row down? This process would conitnue until the macro
found that both the cells in columns A and C were blank.
 
M

Max

One play which does it using formulas ..

Assume source data to be monitored is in a sheet: x,
cols A to M, data from row1 down

In another sheet,
Put in A1:
=IF(AND(x!C1="",ISNUMBER(x!A1)),ROW(),"")

Put in B1:
=IF(ROW()>COUNT($A:$A),"",IF(INDEX(x!A:A,SMALL($A:$A,ROW()))=0,"",INDEX(x!A:A,SMALL($A:$A,ROW()))))
Copy B1 across to N1. Select A1:N1, copy down to cover the max expected
extent of source data in x, say down to N200? Hide away col A. Cols B to N
will return the required result lines from x's cols A to M, all neatly
bunched at the top.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top