![]() |
select records with a specific value
How can I select only those records with a "1" in col A and highlight only
col C of the same record(s) for copying? I'd like to put this in a Macro. Thanks -- Al |
Al,
Columns("A:A").AutoFilter Field:=1, Criteria1:="1" Intersect(Columns("C:C"), ActiveSheet.UsedRange) _ .SpecialCells(xlCellTypeVisible).Copy HTH, Bernie MS Excel MVP "AMK" wrote in message ... How can I select only those records with a "1" in col A and highlight only col C of the same record(s) for copying? I'd like to put this in a Macro. Thanks -- Al |
entered your suggestion into a macro as follows:
Columns("A:A").AutoFilter Field:=1, Criteria1:="1" Intersect(Columns("C:C"), ActiveSheet.UsedRange _ .SpecialCells(xlCellTypeVisible).Copy Will not run????? Please let me know if i'm misrepresenting something. Thanks -- Al "Bernie Deitrick" wrote: Al, Columns("A:A").AutoFilter Field:=1, Criteria1:="1" Intersect(Columns("C:C"), ActiveSheet.UsedRange) _ .SpecialCells(xlCellTypeVisible).Copy HTH, Bernie MS Excel MVP "AMK" wrote in message ... How can I select only those records with a "1" in col A and highlight only col C of the same record(s) for copying? I'd like to put this in a Macro. Thanks -- Al |
Al,
What error messages do you get? Is the sheet of interest active at the time? Are you using a commandbutton, or using Tools / Macro/Run? Where did you put the code? Bernie "AMK" wrote in message ... entered your suggestion into a macro as follows: Columns("A:A").AutoFilter Field:=1, Criteria1:="1" Intersect(Columns("C:C"), ActiveSheet.UsedRange _ .SpecialCells(xlCellTypeVisible).Copy Will not run????? Please let me know if i'm misrepresenting something. Thanks -- Al "Bernie Deitrick" wrote: Al, Columns("A:A").AutoFilter Field:=1, Criteria1:="1" Intersect(Columns("C:C"), ActiveSheet.UsedRange) _ .SpecialCells(xlCellTypeVisible).Copy HTH, Bernie MS Excel MVP "AMK" wrote in message ... How can I select only those records with a "1" in col A and highlight only col C of the same record(s) for copying? I'd like to put this in a Macro. Thanks -- Al |
All times are GMT +1. The time now is 05:02 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com