Moving a row to new work sheet/book if order=yes

E

eddy f

Please help,

I'm trying to analyse what work/jobs are going on per month. I'm no
very accustomed to excel so go easy.
I have set up a number of columns containing job no, date, job=yes/no
cost, sell, profit etc.

How can I set up the spread sheet to copy a row to a separate printabl
area, sheet or workbook when a cell value satisfies an argument. I wan
to use order=yes/no.

Any help will be greatly appreciated.

Many thanks

E
 
T

Tom Ogilvy

right click on the sheet tab and select View code. Put in code like this

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
Dim rng As Range
If target.count > 1 then exit sub
if target.column = 3 then ' column C job = yes/no
if lcase(target.value) = "yes" then
set rng = Worksheets("sheet2"").Cells(rows.count,1).End(xlup)(2)
target.entirerow.copy Destination:=rng
End if
end if
End Sub

this assumes you will edit the cell in column C and change the value to yes

change sheet2 to the sheet name where you want the data copied
 
E

eddy f

Thnaks very much for the reply and it works great.

I've just been playing around with filters and pivot tables, as i
happens i can do just what i need to with these.

But thanks for the info and your time.

regards

E
 

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