ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Automatically Cut Row of Data and Paste to Other Sheet? (https://www.excelbanter.com/excel-programming/301800-automatically-cut-row-data-paste-other-sheet.html)

D[_6_]

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



Papou

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





D[_6_]

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






All times are GMT +1. The time now is 02:54 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com