ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Copy rows that meet a certain criteria (https://www.excelbanter.com/excel-programming/360722-copy-rows-meet-certain-criteria.html)

James[_40_]

Copy rows that meet a certain criteria
 
Is there a way to select all rows in a list that contain a "yes" in the
first column of that list? I want a macro to copy only those rows with a
"yes" in the first column and paste those rows to another worksheet.



Leonardo

Copy rows that meet a certain criteria
 
Columns("A:A").Select
Selection.AutoFilter
Selection.AutoFilter Field:=1, Criteria1:="YES"
Selection.Copy
Sheets("Hoja2").Select
ActiveSheet.Paste


James wrote:
Is there a way to select all rows in a list that contain a "yes" in the
first column of that list? I want a macro to copy only those rows with a
"yes" in the first column and paste those rows to another worksheet.




All times are GMT +1. The time now is 05:30 PM.

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