Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Automatically Cut Row of Data and Paste to Other Sheet?
Hey guys-
You have all been soo wonderful about helping me out on the other issues- I decided to throw this one at you... I have searched newsgroups, this forum, etc, and see references to this, but not to do exactly as I need done. So maybe someone can throw me in the right direction here... I have a column of numeric values. IF the cell value is negative or less than zero, I want the entire ROW that it sits on cut and pasted onto the worksheet named 'Check Status' within the sale file. This row(s) would be pasted to the first available cell on that sheet. I would like this all done automatically. How do I do this? Thank you soo much in advance! D |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Automatically Cut Row of Data and Paste to Other Sheet?
Hello D
Have a try with this non-tested sample code (you will need to amend accordingly with sheet names and ranges) The following code will filter sheet "Feuil1" (data from column A to E) with criteria for values in column C less then zero It will then cut the filtered rows and paste them onto sheet "Feuil2" starting from the first available row in colmun A. Dim LastRow As Long LastRow = Worksheets("Feuil1").Range("A65536").End(xlUp).Row Worksheets("Feuil1").Range("C:C").AutoFilter Field:=1, Criteria1:="<0" Application.DisplayAlerts = False Worksheets("Feuil1").Range("A2:E" & LastRow).SpecialCells(xlCellTypeVisible).Cut Worksheets("Feuil2").Range("A65536").End(2).Paste Application.DisplayAlerts = True Application.CutCopyMode = False Worksheets("Feuil1").Range("C1").AutoFilter HTH Regards Pascal "D" a écrit dans le message de news:T5tAc.5809$tC5.1708@fed1read02... Hey guys- You have all been soo wonderful about helping me out on the other issues- I decided to throw this one at you... I have searched newsgroups, this forum, etc, and see references to this, but not to do exactly as I need done. So maybe someone can throw me in the right direction here... I have a column of numeric values. IF the cell value is negative or less than zero, I want the entire ROW that it sits on cut and pasted onto the worksheet named 'Check Status' within the sale file. This row(s) would be pasted to the first available cell on that sheet. I would like this all done automatically. How do I do this? Thank you soo much in advance! D |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Automatically Cut Row of Data and Paste to Other Sheet?
Can anyone help on this?
"D" wrote in message news:T5tAc.5809$tC5.1708@fed1read02... Hey guys- You have all been soo wonderful about helping me out on the other issues- I decided to throw this one at you... I have searched newsgroups, this forum, etc, and see references to this, but not to do exactly as I need done. So maybe someone can throw me in the right direction here... I have a column of numeric values. IF the cell value is negative or less than zero, I want the entire ROW that it sits on cut and pasted onto the worksheet named 'Check Status' within the sale file. This row(s) would be pasted to the first available cell on that sheet. I would like this all done automatically. How do I do this? Thank you soo much in advance! D |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to automatically paste cells from one sheet to another sheet? | Excel Discussion (Misc queries) | |||
invoice on sheet 1 & data store on sheet 2 automatically | Excel Discussion (Misc queries) | |||
Copy and paste cahrt to new sheet-update data automatically? | Charts and Charting in Excel | |||
create a formula in one sheet that would read data from separate sheet automatically | Excel Discussion (Misc queries) | |||
can entered data in sheet 1 be automatically pasted in sheet 2 | Excel Discussion (Misc queries) |