![]() |
Moving a row to new work sheet/book if order=yes
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 -- Message posted from http://www.ExcelForum.com |
Moving a row to new work sheet/book if order=yes
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 -- Regards, Tom Ogilvy "eddy f " wrote in message ... Please help, I'm trying to analyse what work/jobs are going on per month. I'm not 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 printable area, sheet or workbook when a cell value satisfies an argument. I want to use order=yes/no. Any help will be greatly appreciated. Many thanks Ed --- Message posted from http://www.ExcelForum.com/ |
Moving a row to new work sheet/book if order=yes
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 -- Message posted from http://www.ExcelForum.com |
All times are GMT +1. The time now is 12:50 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com